-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug in Free List Allocator on 32bit systems #18
Comments
That depends (on Windows) where you get the memory from, as far as I know (VirtualMemory is zeroed), the padding bytes are undefined (so it depends on what the allocator did). On the other hand, you can just set them to zero by making the padding part of your type:
|
It is still a bug. |
I'm just pointing out to how to keep the padding of an object under control as it might be that comparison might depend on it (like with
The trick is to have no padding, which can be statically asserted and/or sfinaed, specilized. |
Hi
There is a bug in your Free List Allocator when alignmentPadding is not zero like on 32 bit systems.
memory-allocators/src/FreeListAllocator.cpp
Line 46 in 0d6ede3
One bug is here obviously and newFreeNode address is inside of the current block when alignmentPadding is not zero.
memory-allocators/src/FreeListAllocator.cpp
Line 53 in 0d6ede3
The text was updated successfully, but these errors were encountered: