Lines Matching refs:p
203 void * p = 0; in rtl_allocateMemory() local
225 p = addr + RTL_MEMALIGN; in rtl_allocateMemory()
236 return (p); in rtl_allocateMemory()
241 void SAL_CALL rtl_freeMemory (void * p) SAL_THROW_EXTERN_C() in rtl_freeMemory() argument
243 if (p != 0) in rtl_freeMemory()
245 char * addr = (char*)(p) - RTL_MEMALIGN; in rtl_freeMemory()
257 void * SAL_CALL rtl_reallocateMemory (void * p, sal_Size n) SAL_THROW_EXTERN_C() in rtl_reallocateMemory() argument
261 if (p != 0) in rtl_reallocateMemory()
263 void * p_old = p; in rtl_reallocateMemory()
264 sal_Size n_old = ((sal_Size*)( (char*)(p) - RTL_MEMALIGN ))[0] - RTL_MEMALIGN; in rtl_reallocateMemory()
266 p = rtl_allocateMemory (n); in rtl_reallocateMemory()
267 if (p != 0) in rtl_reallocateMemory()
269 memcpy (p, p_old, SAL_MIN(n, n_old)); in rtl_reallocateMemory()
275 p = rtl_allocateMemory (n); in rtl_reallocateMemory()
278 else if (p != 0) in rtl_reallocateMemory()
280 rtl_freeMemory (p), p = 0; in rtl_reallocateMemory()
282 return (p); in rtl_reallocateMemory()
311 void SAL_CALL rtl_freeMemory (void * p) in rtl_freeMemory() argument
313 free (p); in rtl_freeMemory()
318 void * SAL_CALL rtl_reallocateMemory (void * p, sal_Size n) in rtl_reallocateMemory() argument
320 return realloc (p, n); in rtl_reallocateMemory()
341 void * p = rtl_allocateMemory (n); in rtl_allocateZeroMemory() local
342 if (p != 0) in rtl_allocateZeroMemory()
343 memset (p, 0, n); in rtl_allocateZeroMemory()
344 return (p); in rtl_allocateZeroMemory()
349 void SAL_CALL rtl_freeZeroMemory (void * p, sal_Size n) SAL_THROW_EXTERN_C() in rtl_freeZeroMemory() argument
351 if (p != 0) in rtl_freeZeroMemory()
353 memset (p, 0, n); in rtl_freeZeroMemory()
354 rtl_freeMemory (p); in rtl_freeZeroMemory()