how distribute aligned memory wholly controlling customary library?


i only finished exam biased office interview, doubt stumped me, even controlling google reference. i'd organization it:




the memset_16aligned duty requires 16-byte aligned pointer upheld it, crash.



a) distribute 1024 bytes memory, align 16 byte boundary?

b) giveaway memory after memset_16aligned executed.




{    
vacant *mem;
vacant *ptr;

// answer a) here

memset_16aligned(ptr, 0, 1024);

// answer b) here
}


Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

using mvc, should hoop communication between views? between models?