tags:

views:

45

answers:

1

nsapi supplies a MALLOC macro that gets memory from a pool that will be freed for you when the request ends, but it doesn't say what happens if you call this malloc function in an initialization function, when there is no request. Can this malloc (or pblock_created) memory be presumed to be persistent? It doesn't say anything about it in the nsapi docs, I was hoping somebody had some experience with this.

A: 

I got a response from somebody on a sun forum. It turns out that yes, in fact, if you call MALLOC() while in the initialization section the memory you get back is not pooled and will persist.

stu