Home » U++ Library support » U++ Core » Allocator question
Allocator question [message #18299] |
Sun, 21 September 2008 13:09 |
cbpporter
Messages: 1401 Registered: September 2007
|
Ultimate Contributor |
|
|
I have multiple list of a large number of items that must be stored. Up until now I have kept the lists in a Vectors. Since most items only require 4 bytes of data (about 80%), but the rest require more that 36 bytes, I thought that using an Array with a hierarchy of item classes would be more memory efficient. The small items would fit in 8 bytes (together with the pointer).
The problem is that in allocator implementation documentation it says that block sizes are rounded to 16 bytes. So if my 4 byte object takes 16, even when compared to 36, the effort to reactor does not seem to be worth it. Is the 16 byte size rounding still used?
|
|
|
|
Goto Forum:
Current Time: Mon Apr 29 11:03:46 CEST 2024
Total time taken to generate the page: 0.04460 seconds
|