×

Loading...

Memory aligment

. It's safe to do the implicit conversion for values, because you only make a memory copy. Imagine you explicitly cast a
char* into int*, what will happen? You will end up with a bus error on
Unix, although you are fine on PC because PC's are running little endian
chips. int data access requires an alignment of 4 on UNIX but your char* pointer might very likely be pointing to some odd numbered memory address.
Report

Replies, comments and Discussions: