Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » Allocator question
Allocator question [message #18299] Sun, 21 September 2008 13:09 Go to next message
cbpporter is currently offline  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?
Re: Allocator question [message #18300 is a reply to message #18299] Sun, 21 September 2008 18:42 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Yes 16 byte rounding.

Mirek
Previous Topic: C++ parsing
Next Topic: VMware / Ubuntu problems
Goto Forum:
  


Current Time: Mon Apr 29 16:17:57 CEST 2024

Total time taken to generate the page: 0.02356 seconds