version 1.1.2.8, 2012/02/28 12:01:12
|
version 1.1.2.10, 2012/02/28 12:44:18
|
Line 277 mpool_realloc(mpool_t * __restrict mp, void * __restri
|
Line 277 mpool_realloc(mpool_t * __restrict mp, void * __restri
|
|
|
/* quota */ |
/* quota */ |
if (mp->pool_quota.max && |
if (mp->pool_quota.max && |
(mp->pool_quota.curr + (newsize - osize)) > mp->pool_quota.max) { | (mp->pool_quota.curr + ((u_long) newsize - osize)) > mp->pool_quota.max) { |
sess_SetErr(ENOMEM, "Max.allocate memory quota has been reached"); |
sess_SetErr(ENOMEM, "Max.allocate memory quota has been reached"); |
mpool_unlock(mp); |
mpool_unlock(mp); |
return NULL; |
return NULL; |
Line 318 mpool_realloc(mpool_t * __restrict mp, void * __restri
|
Line 318 mpool_realloc(mpool_t * __restrict mp, void * __restri
|
|
|
mpool_unlock(mp); |
mpool_unlock(mp); |
return NULL; |
return NULL; |
} | } else |
| m->alloc_mem = (u_int*) p; |
} |
} |
/* quota */ |
/* quota */ |
mp->pool_quota.curr += (newsize - osize); | mp->pool_quota.curr += (u_long) newsize - osize; |
|
|
m->alloc_mem[0] = newsize / sizeof(u_int); |
m->alloc_mem[0] = newsize / sizeof(u_int); |
m->alloc_mem[1] = MEM_MAGIC_START; |
m->alloc_mem[1] = MEM_MAGIC_START; |