Skip to content

Commit

Permalink
v1.2 patch
Browse files Browse the repository at this point in the history
Signed-off-by: Rian Quinn <“[email protected]”>
  • Loading branch information
Rian Quinn authored and Connor Davis committed May 26, 2017
1 parent 4f64b2a commit bc77794
Show file tree
Hide file tree
Showing 11 changed files with 262 additions and 441 deletions.
22 changes: 17 additions & 5 deletions newlib/libc/include/malloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct mallinfo {
size_t uordblks; /* total allocated space */
size_t fordblks; /* total non-inuse space */
size_t keepcost; /* top-most, releasable (via malloc_trim) space */
};
};

/* The routines. */

Expand Down Expand Up @@ -61,15 +61,27 @@ extern _PTR _realloc_r _PARAMS ((struct _reent *, _PTR, size_t));
extern _PTR calloc _PARAMS ((size_t, size_t));
#ifdef __CYGWIN__
#undef _calloc_r
#define _calloc_r(r, s1, s2) calloc (s1, s2);
/* ---------------------------------------------------------------------------*/
/* bareflank: start */
/* ---------------------------------------------------------------------------*/
#define _calloc_r(r, s1, s2) calloc (s1, s2)
/* ---------------------------------------------------------------------------*/
/* bareflank: end */
/* ---------------------------------------------------------------------------*/
#else
extern _PTR _calloc_r _PARAMS ((struct _reent *, size_t, size_t));
#endif

extern _PTR memalign _PARAMS ((size_t, size_t));
#ifdef __CYGWIN__
#undef _memalign_r
#define _memalign_r(r, s1, s2) memalign (s1, s2);
/* ---------------------------------------------------------------------------*/
/* bareflank: start */
/* ---------------------------------------------------------------------------*/
#define _memalign_r(r, s1, s2) memalign (s1, s2)
/* ---------------------------------------------------------------------------*/
/* bareflank: end */
/* ---------------------------------------------------------------------------*/
#else
extern _PTR _memalign_r _PARAMS ((struct _reent *, size_t, size_t));
#endif
Expand Down Expand Up @@ -151,10 +163,10 @@ extern _VOID _mstats_r _PARAMS ((struct _reent *, char *));
#define M_KEEP 4 /* UNUSED in this malloc */

/* mallopt options that actually do something */

#define M_TRIM_THRESHOLD -1
#define M_TOP_PAD -2
#define M_MMAP_THRESHOLD -3
#define M_MMAP_THRESHOLD -3
#define M_MMAP_MAX -4

#ifndef __CYGWIN__
Expand Down
Loading

0 comments on commit bc77794

Please sign in to comment.