2012年6月25日

customize your own memory allocator (1)

摘要: I wrote a simple memory allocator to substitute malloc/free in libc. The code is so simple~[torstan]$ more malloc.h#ifndef _MALLOC_MY_H#define _MALLOC_MY_H#include<stdio.h>void* malloc(size_t sz);void free(void *p);#endif[torstan]$ more malloc.c#include "malloc.h"#include <sys/mma 阅读全文

posted @ 2012-06-25 15:47 Torstan 阅读(183) 评论(0) 推荐(0) 编辑

导航