In the last episode (Dec 01), Dan Nelson said: 
> Here's what I get with a simple test program on a month-old 7.1-PRE

Gah. silly mailing-list attachment stripper.

#include <stdlib.h>
#include <stdio.h>

int main(void)
{
  size_t malloced = 0;
  size_t chunksize = 1024*1024;
  void *first = NULL;
  void *last = NULL;
  void *ptr;
  
  while ((ptr = malloc(chunksize)) != NULL) {
    if (first == NULL)
      first = ptr;
    last = ptr;
    malloced += chunksize;
  }
  printf("Malloced %zu bytes. First: %p, Last: %p\n", malloced, first, last);
  exit(0);
}

-- 
        Dan Nelson
        [EMAIL PROTECTED]
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to