#include <stdio.h>
int main(int argc, char *argv[]) {
long* fp;
while(1)
{
fp = (long* ) malloc (sizeof(long));
printf("%d\t",fp);
}
}
I ran this.
I got result such as:
1193392 1193408 1193424 1193440 1193456 1193472 1193488 1193504 1193520 1193536 1193552 1193568 1193584 1193600 1193616 1193632 1193648 1193664 1193680 1193696 1193712 1193728 1193744 1193760 1193776 1193792 1193808 1193824 1193840 1193856 1193872 1193888 1193904 1193920 1193936 1193952 1193968 1193984 1194000 1194016 1194032 1194048 1194064 1194080 1194096
Does this mean long on my system is 16 byte long?
thanks.
I just noticed that.. from the beginning part. the difference is 14, then it beomes to 16. bizarre.
Not necessarily. It could indicate that the granularity of the allocator is 16 bytes.