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 » Community » U++ community news and announcements » New Core
Re: New Core [message #46474 is a reply to message #46461] Sat, 14 May 2016 07:52 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14112
Registered: November 2005
Ultimate Member
cbpporter wrote on Thu, 12 May 2016 19:29
And a question: I can fully understand the 16 bit alignment for allocation and I've used a lot in the past SSE, so this is a good move.

But why make the smallest allocation size 32, not 16?


It is related to the implementation of allocator.

In short: There are small blocks and there are large blocks. At some point, I need to know if freed block is small or large. Fast method to do that is to use single bit in address - small blocks are always 32 bytes aligned, large blocks are 32 bytes misaligned. Therefore small block has to be multiple of 32.

Previous core used the same process, but 16 byte misalignment. So the smallest block was 16 bytes and alignment 8 bytes.

Of course, I have tested this (with theide and other apps) and the increase in memory consumption is negligible.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Core: New String methods
Next Topic: ide: Optimal mode removed
Goto Forum:
  


Current Time: Sun Nov 10 20:42:42 CET 2024

Total time taken to generate the page: 0.04801 seconds