Possible waste of memory #17

Open
opened 2021-01-17 15:56:51 +00:00 by wbochtler · 0 comments
wbochtler commented 2021-01-17 15:56:51 +00:00 (Migrated from github.com)

I stumbled across line 5623 in the AllocateAlignedMemory function:

inc(Size,((Align shl 1)+SizeOf(pointer)));

My understanding is that the maximum misalignment is Align-1 bytes.
Therefore the doubling by means of "Align shl 1" is not clear to me or do I miss something?

Kind regards,
Werner

I stumbled across line 5623 in the AllocateAlignedMemory function: ` inc(Size,((Align shl 1)+SizeOf(pointer)));` My understanding is that the maximum misalignment is Align-1 bytes. Therefore the doubling by means of "Align shl 1" is not clear to me or do I miss something? Kind regards, Werner
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
BeRo1985/pasmp#17
No description provided.