1 Star 0 Fork 11

liufshu / oh-dropbear

forked from xfan1024 / oh-dropbear 
Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
dbmalloc.h 571 Bytes
Copy Edit Raw Blame History
xfan1024 authored 2021-08-13 14:40 . Init commit: dropbear-2020.81
#ifndef DBMALLOC_H_
#define DBMALLOC_H_
#include "stdint.h"
#include "stdlib.h"
#include "options.h"
void * m_malloc(size_t size);
void * m_calloc(size_t nmemb, size_t size);
void * m_strdup(const char * str);
void * m_realloc(void* ptr, size_t size);
#if DROPBEAR_TRACKING_MALLOC
void m_free_direct(void* ptr);
void m_malloc_set_epoch(unsigned int epoch);
void m_malloc_free_epoch(unsigned int epoch, int dofree);
#else
/* plain wrapper */
#define m_free_direct free
#endif
#define m_free(X) do {m_free_direct(X); (X) = NULL;} while (0)
#endif /* DBMALLOC_H_ */
1
https://gitee.com/liufshu/oh-dropbear.git
git@gitee.com:liufshu/oh-dropbear.git
liufshu
oh-dropbear
oh-dropbear
master

Search