Basic question about malloc

2015-04-22 Thread mudongliang
Hi,
 I'm looking for that whether the object allocated by malloc is the
multiple of certain bytes!
 Or how does the malloc allocate dynamic memory ?? 
 I does an experiment in my computer!
#include
#include

#define NUM 33
int main(int argc,const char *argv[])
{
char *a, *b, *c;
a = malloc(NUM);
b = malloc(NUM);
c = malloc(NUM);

printf("a = %x\n",a);
printf("b = %x\n",b);
printf("c = %x\n",c);
free(a);
free(b);
free(c);
return 0;
}

But the result has no feature about a ,b ,c!
Can someone tell me what's wrong with me?
My GCC version is gcc (Debian 4.9.2-10) 4.9.2
mudongliang


-- 
To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/blu436-smtp147f09dc030aefd33befafbbc...@phx.gbl



malloc/free details in gcc5.1

2015-04-23 Thread mudongliang
Hello, 
I want to look at the details of malloc/free in the gcc5.1(I have
downloaded). But I don't know the file structure of gcc! 
Where is the file containing malloc/free ?
And is there any advice about reading the source code about gcc?
Besides , what's the relationship between gcc and debian-gcc ?
How can I do a contribution to debian-gcc ?
Thank you!
mudongliang


-- 
To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/blu436-smtp201dee67fd85248aead8857bc...@phx.gbl