summaryrefslogtreecommitdiffstats
path: root/zallocevil.c
blob: ab666e8a9728596689db7f5d0f16024952cd7b2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* Simple test program for zalloc() */

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <limits.h>
#include "lpsm.h"

int main(int argc, char **argv) {
   void **root_ptr,*ptr;
   int i;

   if (!(root_ptr = lpsm_init("arena.dat", "arena.log")))
       return 1;
   for(i=0;i<100000;i+=100) {
       printf("%d\n",i);
       ptr = lpsm_zalloc(i);
       /*lpsm_free(ptr);*/
   }
   return 0;
}