-
Notifications
You must be signed in to change notification settings - Fork 284
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
alignment issues #157
Comments
I didn't have issues with the Did the assertions trigger for you in the release version or on git head? The current state should now be that all Allocator derived classes should either pass on aligned data or manually align it. |
Thanks! It seems to work now. I was using current HEAD. The alignment assertion triggered on GCAllocator, AutoFreeListAllocator (using the GCAllocator) and even with the manualAllocator. I am using a 64 bit system, if that matters. |
The only thing I don't understand is the Interestingly, I'm running 64-bit all the time on Linux and didn't have any problems there... |
I am a bit confused now. I checked out the old version again, so I can tell you how to reproduce it, but now I can't reproduce it myself. Yesterday it triggered like always. It is the same thing all the time, someone tells you he can't reproduce it and suddenly you stop having issues. (Maybe just because of the reboot, memory is less corrupted so I get aligned one? Don't know.) I will keep running the old version and see if it happens again. Why do you understand the issue for the GC allocator? Shouldn't it return aligned memory? Regardless, the issue seems to be fixed, so if no further investigation is desired, feel free to close this issue. And thanks for this very fast fix! |
Just because the GCAllocator originally had no alignment code, as GC.malloc() always returned aligned memory for me. But since the documentation states that it is not aligned (at least not to 16 bytes), it's clear that the alignment code was needed (that I added only after you opened the report). Alright, I'll close this then for now. Due to the amount of changes and testing I did yesterday, I don't really feel like hunting this "ghost" down. |
The newly inserted align checks in the Allocater interface in memory.d fail for me.
I tested it with the GCAllocator, the AutoFreeListAllocator and even the manualAllocator.
It seems that GC.malloc does not return aligned data. Not 16 Byte aligned, not even 4 Byte aligned I had to change the mask down to 0x1 to make it work. The dlang.org documentation states that it returns aligned memory, but 2 Byte is a pretty low alignment.
Am I missing something? Do you experience the same issues?
The text was updated successfully, but these errors were encountered: