-void nsmstats(int hookhum, void *arg) {
- int i;
- char buf[1024], header[1024];
- unsigned long totalcount = 0;
- size_t totalsize = 0, totalrealsize = 0;
- long level = (long)arg;
-
- for (i=0;i<MAXPOOL;i++) {
- struct nsmpool *pool=&pools[i];
- size_t realsize;
-
- if (!pool->count)
- continue;
-
- realsize=pool->size + pool->count * sizeof(struct nsminfo) + sizeof(struct nsmpool);
-
- snprintf(header, sizeof(header), "NSMalloc: pool %2d (%s): ", i, poolnames[i]?poolnames[i]:"??");
-
- if(level > 10) {
- snprintf(buf, sizeof(buf), "%s %s", header, formatmbuf(pool->count, pool->size, realsize));
- triggerhook(HOOK_CORE_STATSREPLY, buf);
- }
+void *nsrealloc(unsigned int poolid, void *ptr, size_t size) {
+ return realloc(ptr, size);
+}