acl/lib_acl/samples/debug_malloc/main.cpp
zsxxsz cf2528eb7c 完善了非阻塞IO的SSL功能;将 samples 移到 lib_acl 目录下
完善了非阻塞IO的SSL功能;将 acl/samples/ 下的示例分别移到 lib_acl 及 lib_protocol 目录下
2014-11-30 21:15:35 +08:00

21 lines
377 B
C++

#include "lib_acl.h"
int main(int argc acl_unused, char *argv[] acl_unused)
{
char *ptr2;
char *ptr3 = acl_mystrdup("hello world!");
int i;
acl_debug_malloc_init(NULL, "log.txt");
for (i = 0; i < 100; i++) {
(void) acl_mymalloc(100);
ptr2 = (char*) acl_mymalloc(100);
acl_myfree(ptr2);
}
acl_myfree(ptr2);
acl_myfree(ptr3);
return 0;
}