Many libraries allow the user to pass in replacements for malloc(), free(), and realloc(). This helps the user debug memory allocation, and use special-purpose allocators as needed.
I've done a patch for this. Instead of using malloc(), free(), realloc(), calloc(), and strdup(), libevent now uses event_malloc(), event_free(), and so on. By default, these are the same as the stdc versions, but the library user can override them by calling event_sent_mem_functions and passing in a malloc/realloc/free tuple.
I'll probably commit this tomorrow if there are no objections.
(I'd attach the patch, but sourceforge is being funny.)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=499
Originator: YES
I've done a patch for this. Instead of using malloc(), free(), realloc(), calloc(), and strdup(), libevent now uses event_malloc(), event_free(), and so on. By default, these are the same as the stdc versions, but the library user can override them by calling event_sent_mem_functions and passing in a malloc/realloc/free tuple.
I'll probably commit this tomorrow if there are no objections.
(I'd attach the patch, but sourceforge is being funny.)
Logged In: YES
user_id=245089
Originator: NO
Sounds great to me. Thanks.
Logged In: YES
user_id=499
Originator: YES
Committed to trunk; thanks!