in reply to Calling a C function using malloc() in a XS
use more memory thanvoid do_simulation() { struct s* m; m = (struct s*)malloc(10000000 * sizeof(struct s)); free(m); m = (struct s*)malloc(10000000 * sizeof(struct s)); free(m); }
void do_simulation() { struct s* m = (struct s*)malloc(10000000 * sizeof(struct s)); free(m); }
It could be that the memory is being pout back into Perl's free memory pool and you just don't realize it.
|
|---|