Hello,
I have searched this forum and google to try and find out how memory is allocated and have done some testing.
Is it true that allocated memory is always DWORD aligned?
I have done this test, which returns true:
A simple yes or no will suffice.
I have searched this forum and google to try and find out how memory is allocated and have done some testing.
Is it true that allocated memory is always DWORD aligned?
I have done this test, which returns true:
- Code:
WORD *test[100];
bool aligned = true;
for (int j=0; j < 100; j++) {
test[j] = new WORD;
if ((int)test[j] % 4) {
aligned = false;
}
}
for (j=0; j < 100; j++) delete test[j];
A simple yes or no will suffice.