{
/* void *slotmem = NULL; */
int fbased = 1;
{
/* void *slotmem = NULL; */
int fbased = 1;
char *ptr;
sharedslotdesc_t desc;
ap_slotmem_instance_t *res;
char *ptr;
sharedslotdesc_t desc;
ap_slotmem_instance_t *res;
*/
if (type & AP_SLOTMEM_TYPE_PERSIST) {
restore_slotmem(ptr, fname, dsize, pool);
*/
if (type & AP_SLOTMEM_TYPE_PERSIST) {
restore_slotmem(ptr, fname, dsize, pool);
res->fbased = fbased;
res->shm = shm;
res->num_free = (unsigned int *)ptr;
res->fbased = fbased;
res->shm = shm;
res->num_free = (unsigned int *)ptr;
- *res->num_free = item_num;
+ if (!restored) {
+ *res->num_free = item_num;
+ }
res->persist = (void *)ptr;
ptr += AP_UNSIGNEDINT_OFFSET;
res->base = (void *)ptr;
res->persist = (void *)ptr;
ptr += AP_UNSIGNEDINT_OFFSET;
res->base = (void *)ptr;