# ld_preload **Repository Path**: hejinjing/ld_preload ## Basic Information - **Project Name**: ld_preload - **Description**: 使用 本地udpserver 和 LD_PRELOAD 预加载环境变量加载 内存分配(alloc),释放(free)接口拦截共享库 用以统计和监视内存的使用. - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-12-11 - **Last Updated**: 2025-12-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README 目的: 使用 本地udpserver 和 LD_PRELOAD 预加载环境变量加载 内存分配(alloc),释放(free)接口拦截共享库 用以统计和监视内存的使用. 具体操作如下: 以测试test 程序为例. 1. 启动udpServer $ udpServer 2. 启动用户程序 LD_PRELOAD=libpreload_udpsend.so ./test 3. udpServer 操作 需再启动一个控制台, 在该目录下 touch report.cmd 此时即有report-y-h-d-h-m-s.txt 文件生成. 可以检查该文件 你还可以 touch debugon.cmd 打开调试 touch debugoff.cmd 关闭调试输出 touch clear.cmd 清除以前的记录,重新开始 touch report.cmd 汇报当前的内存状态