forked from wolfSSL/wolfssl
Addressing PR comments
This commit is contained in:
@@ -401,6 +401,7 @@ extern "C" {
|
|||||||
|
|
||||||
/* prototypes for user heap override functions */
|
/* prototypes for user heap override functions */
|
||||||
/* Note: Realloc only required for normal math */
|
/* Note: Realloc only required for normal math */
|
||||||
|
/* Note2: XFREE(NULL) must be properly handled */
|
||||||
#include <stddef.h> /* for size_t */
|
#include <stddef.h> /* for size_t */
|
||||||
extern void *myMalloc(size_t n, void* heap, int type);
|
extern void *myMalloc(size_t n, void* heap, int type);
|
||||||
extern void myFree(void *p, void* heap, int type);
|
extern void myFree(void *p, void* heap, int type);
|
||||||
|
@@ -419,6 +419,7 @@ extern "C" {
|
|||||||
|
|
||||||
/* prototypes for user heap override functions */
|
/* prototypes for user heap override functions */
|
||||||
/* Note: Realloc only required for normal math */
|
/* Note: Realloc only required for normal math */
|
||||||
|
/* Note2: XFREE(NULL) must be properly handled */
|
||||||
#include <stddef.h> /* for size_t */
|
#include <stddef.h> /* for size_t */
|
||||||
extern void *myMalloc(size_t n, void* heap, int type);
|
extern void *myMalloc(size_t n, void* heap, int type);
|
||||||
extern void myFree(void *p, void* heap, int type);
|
extern void myFree(void *p, void* heap, int type);
|
||||||
|
@@ -410,6 +410,7 @@ extern "C" {
|
|||||||
|
|
||||||
/* prototypes for user heap override functions */
|
/* prototypes for user heap override functions */
|
||||||
/* Note: Realloc only required for normal math */
|
/* Note: Realloc only required for normal math */
|
||||||
|
/* Note2: XFREE(NULL) must be properly handled */
|
||||||
#include <stddef.h> /* for size_t */
|
#include <stddef.h> /* for size_t */
|
||||||
extern void *myMalloc(size_t n, void* heap, int type);
|
extern void *myMalloc(size_t n, void* heap, int type);
|
||||||
extern void myFree(void *p, void* heap, int type);
|
extern void myFree(void *p, void* heap, int type);
|
||||||
|
@@ -397,6 +397,7 @@ extern "C" {
|
|||||||
|
|
||||||
/* prototypes for user heap override functions */
|
/* prototypes for user heap override functions */
|
||||||
/* Note: Realloc only required for normal math */
|
/* Note: Realloc only required for normal math */
|
||||||
|
/* Note2: XFREE(NULL) must be properly handled */
|
||||||
#include <stddef.h> /* for size_t */
|
#include <stddef.h> /* for size_t */
|
||||||
extern void *myMalloc(size_t n, void* heap, int type);
|
extern void *myMalloc(size_t n, void* heap, int type);
|
||||||
extern void myFree(void *p, void* heap, int type);
|
extern void myFree(void *p, void* heap, int type);
|
||||||
|
@@ -417,6 +417,7 @@ extern "C" {
|
|||||||
|
|
||||||
/* prototypes for user heap override functions */
|
/* prototypes for user heap override functions */
|
||||||
/* Note: Realloc only required for normal math */
|
/* Note: Realloc only required for normal math */
|
||||||
|
/* Note2: XFREE(NULL) must be properly handled */
|
||||||
#include <stddef.h> /* for size_t */
|
#include <stddef.h> /* for size_t */
|
||||||
extern void *myMalloc(size_t n, void* heap, int type);
|
extern void *myMalloc(size_t n, void* heap, int type);
|
||||||
extern void myFree(void *p, void* heap, int type);
|
extern void myFree(void *p, void* heap, int type);
|
||||||
|
@@ -337,6 +337,7 @@ extern "C" {
|
|||||||
|
|
||||||
/* prototypes for user heap override functions */
|
/* prototypes for user heap override functions */
|
||||||
/* Note: Realloc only required for normal math */
|
/* Note: Realloc only required for normal math */
|
||||||
|
/* Note2: XFREE(NULL) must be properly handled */
|
||||||
#include <stddef.h> /* for size_t */
|
#include <stddef.h> /* for size_t */
|
||||||
extern void *myMalloc(size_t n, void* heap, int type);
|
extern void *myMalloc(size_t n, void* heap, int type);
|
||||||
extern void myFree(void *p, void* heap, int type);
|
extern void myFree(void *p, void* heap, int type);
|
||||||
|
@@ -411,6 +411,7 @@ extern "C" {
|
|||||||
|
|
||||||
/* prototypes for user heap override functions */
|
/* prototypes for user heap override functions */
|
||||||
/* Note: Realloc only required for normal math */
|
/* Note: Realloc only required for normal math */
|
||||||
|
/* Note2: XFREE(NULL) must be properly handled */
|
||||||
#include <stddef.h> /* for size_t */
|
#include <stddef.h> /* for size_t */
|
||||||
extern void *myMalloc(size_t n, void* heap, int type);
|
extern void *myMalloc(size_t n, void* heap, int type);
|
||||||
extern void myFree(void *p, void* heap, int type);
|
extern void myFree(void *p, void* heap, int type);
|
||||||
|
@@ -491,6 +491,7 @@ extern "C" {
|
|||||||
|
|
||||||
/* prototypes for user heap override functions */
|
/* prototypes for user heap override functions */
|
||||||
/* Note: Realloc only required for normal math */
|
/* Note: Realloc only required for normal math */
|
||||||
|
/* Note2: XFREE(NULL) must be properly handled */
|
||||||
#include <stddef.h> /* for size_t */
|
#include <stddef.h> /* for size_t */
|
||||||
extern void *myMalloc(size_t n, void* heap, int type);
|
extern void *myMalloc(size_t n, void* heap, int type);
|
||||||
extern void myFree(void *p, void* heap, int type);
|
extern void myFree(void *p, void* heap, int type);
|
||||||
|
@@ -407,6 +407,7 @@ extern "C" {
|
|||||||
|
|
||||||
/* prototypes for user heap override functions */
|
/* prototypes for user heap override functions */
|
||||||
/* Note: Realloc only required for normal math */
|
/* Note: Realloc only required for normal math */
|
||||||
|
/* Note2: XFREE(NULL) must be properly handled */
|
||||||
#include <stddef.h> /* for size_t */
|
#include <stddef.h> /* for size_t */
|
||||||
extern void *myMalloc(size_t n, void* heap, int type);
|
extern void *myMalloc(size_t n, void* heap, int type);
|
||||||
extern void myFree(void *p, void* heap, int type);
|
extern void myFree(void *p, void* heap, int type);
|
||||||
|
@@ -418,6 +418,7 @@ extern "C" {
|
|||||||
|
|
||||||
/* prototypes for user heap override functions */
|
/* prototypes for user heap override functions */
|
||||||
/* Note: Realloc only required for normal math */
|
/* Note: Realloc only required for normal math */
|
||||||
|
/* Note2: XFREE(NULL) must be properly handled */
|
||||||
#include <stddef.h> /* for size_t */
|
#include <stddef.h> /* for size_t */
|
||||||
extern void *myMalloc(size_t n, void* heap, int type);
|
extern void *myMalloc(size_t n, void* heap, int type);
|
||||||
extern void myFree(void *p, void* heap, int type);
|
extern void myFree(void *p, void* heap, int type);
|
||||||
|
@@ -419,6 +419,7 @@ extern "C" {
|
|||||||
|
|
||||||
/* prototypes for user heap override functions */
|
/* prototypes for user heap override functions */
|
||||||
/* Note: Realloc only required for normal math */
|
/* Note: Realloc only required for normal math */
|
||||||
|
/* Note2: XFREE(NULL) must be properly handled */
|
||||||
#include <stddef.h> /* for size_t */
|
#include <stddef.h> /* for size_t */
|
||||||
extern void *myMalloc(size_t n, void* heap, int type);
|
extern void *myMalloc(size_t n, void* heap, int type);
|
||||||
extern void myFree(void *p, void* heap, int type);
|
extern void myFree(void *p, void* heap, int type);
|
||||||
|
@@ -500,6 +500,7 @@ extern "C" {
|
|||||||
|
|
||||||
/* prototypes for user heap override functions */
|
/* prototypes for user heap override functions */
|
||||||
/* Note: Realloc only required for normal math */
|
/* Note: Realloc only required for normal math */
|
||||||
|
/* Note2: XFREE(NULL) must be properly handled */
|
||||||
#include <stddef.h> /* for size_t */
|
#include <stddef.h> /* for size_t */
|
||||||
extern void *myMalloc(size_t n, void* heap, int type);
|
extern void *myMalloc(size_t n, void* heap, int type);
|
||||||
extern void myFree(void *p, void* heap, int type);
|
extern void myFree(void *p, void* heap, int type);
|
||||||
|
@@ -354,6 +354,7 @@ extern "C" {
|
|||||||
|
|
||||||
/* prototypes for user heap override functions */
|
/* prototypes for user heap override functions */
|
||||||
/* Note: Realloc only required for normal math */
|
/* Note: Realloc only required for normal math */
|
||||||
|
/* Note2: XFREE(NULL) must be properly handled */
|
||||||
#include <stddef.h> /* for size_t */
|
#include <stddef.h> /* for size_t */
|
||||||
extern void *myMalloc(size_t n, void* heap, int type);
|
extern void *myMalloc(size_t n, void* heap, int type);
|
||||||
extern void myFree(void *p, void* heap, int type);
|
extern void myFree(void *p, void* heap, int type);
|
||||||
|
@@ -437,7 +437,13 @@ typedef struct w64wrapper {
|
|||||||
/* idea to add global alloc override by Moises Guimaraes */
|
/* idea to add global alloc override by Moises Guimaraes */
|
||||||
/* default to libc stuff */
|
/* default to libc stuff */
|
||||||
/* XREALLOC is used once in normal math lib, not in fast math lib */
|
/* XREALLOC is used once in normal math lib, not in fast math lib */
|
||||||
/* XFREE on some embedded systems doesn't like free(0) so test */
|
/* XFREE on some embedded systems doesn't like free(0) so test for NULL
|
||||||
|
* explicitly.
|
||||||
|
*
|
||||||
|
* For example:
|
||||||
|
* #define XFREE(p, h, t) \
|
||||||
|
* {void* xp = (p); if (xp != NULL) free(xp, h, t);}
|
||||||
|
*/
|
||||||
#if defined(HAVE_IO_POOL)
|
#if defined(HAVE_IO_POOL)
|
||||||
WOLFSSL_API void* XMALLOC(size_t n, void* heap, int type);
|
WOLFSSL_API void* XMALLOC(size_t n, void* heap, int type);
|
||||||
WOLFSSL_API void* XREALLOC(void *p, size_t n, void* heap, int type);
|
WOLFSSL_API void* XREALLOC(void *p, size_t n, void* heap, int type);
|
||||||
|
Reference in New Issue
Block a user