我的意思是,重载malloc系列,彻底使用我们自己的代码分配内存,包括字符串操作潜在的内存分配,等等。
其他编译器很好解决
(1)gcc中,好像
#define calloc(objs, nSize) Calloc_2 (objs, nSize)
#define malloc(nSize) Malloc_2 (nSize)
#define free(rMem) Free_2(rMem)
--用宏就饿ok。
(2)BCB中,你只要第一个实现malloc等,默认的就自动替换掉了。
其他编译器很好解决
(1)gcc中,好像
#define calloc(objs, nSize) Calloc_2 (objs, nSize)
#define malloc(nSize) Malloc_2 (nSize)
#define free(rMem) Free_2(rMem)
--用宏就饿ok。
(2)BCB中,你只要第一个实现malloc等,默认的就自动替换掉了。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货