Guest User

Untitled

a guest
Oct 16th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. I log fine descriptions.
  2.  
  3. desc on realloc:
  4. The C library function void *realloc(void *ptr, size_t size) attempts to
  5. resize the memory block pointed to by ptr that was previously allocated
  6. with a call to malloc or calloc, or realloc either.
  7.  
  8. paras: void *ptr, size_t size.
  9.  
  10. ptr − This is the pointer to a memory block previously allocated with malloc, calloc or realloc to be reallocated. If this is NULL, a new block is allocated and a pointer to it is returned by the function.
  11.  
  12. size − This is the new size for the memory block, in bytes. If it is 0 and ptr points to an existing block of memory, the memory block pointed by ptr is deallocated and a NULL pointer is returned.
  13.  
  14. atomic_forced_read macro:
  15. # define atomic_forced_read(x) \
  16. ({ __typeof (x) __x; __asm ("" : "=r" (__x) : "0" (x)); __x; })
  17.  
  18. put `malloc_hook` into any one of registers , and retrieve it atomically..
Add Comment
Please, Sign In to add comment