1. Memory allocation and de-allocation
Hi,
I have a simple C program that allocates a bunch of memory and free's it
immediately.
When I run this program, I do not see this memory being reclaimed by the
OS(as observed
by top-5.6). A similar program on Windows NT works as expected(i.e memory
usage
decreases when memory is free'd).
Any ideas why??
Appreciate any advise you can offer..
Regards,
R
// Here is a code snippet:
int main(int argc, char** argv)
{
if (argc == 2)
{
int num_chunks = atoi(argv[1])/1000;
char **buffer[1000];
for (i=0; i<=num_chunks; i++)
{
buffer[i] = (char *) malloc(1000);
free(buffer[i]);
}
return 0;
}
printf("Usage!! %s <memory size> \n",argv[0]);
2. File transfer from NT to Linux and save ownership
3. memory allocation by OS memory manager
4. How to enable CUT/PASTE from mouse
5. Infinite memory?!? Memory allocation bug with gcc?
6. help!!! solaris can not start up!
7. Paging Space allocation of RS6000
8. Question on dump and OS backups
9. suppress allocation warnings for radix-tree allocations
11. Still problems with memory allocations
12. Allocation of memory failed
13. memory alloc failuer : __alloc_pages: 1-order allocation failed.