mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-11 22:20:49 +02:00
commit bash-20180615 snapshot
This commit is contained in:
+4
-8
@@ -111,6 +111,7 @@
|
||||
# define NO_VALLOC
|
||||
#endif
|
||||
|
||||
/* SIZEOF_LONG * 4 - 2, usable bins from 1..NBUCKETS-1 */
|
||||
#define NBUCKETS 30
|
||||
|
||||
#define ISALLOC ((char) 0xf7) /* magic byte that implies allocation */
|
||||
@@ -195,6 +196,8 @@ typedef union _malloc_guard {
|
||||
#define LESSCORE_MIN 10
|
||||
#define LESSCORE_FRC 13
|
||||
|
||||
#define MMAP_THRESHOLD 15 /* must be greater than SPLIT_MAX, COMBINE_MAX */
|
||||
|
||||
#define STARTBUCK 1
|
||||
|
||||
/* Flags for the internal functions. */
|
||||
@@ -1053,12 +1056,9 @@ internal_realloc (mem, n, file, line, flags)
|
||||
/* If ok, use the same block, just marking its size as changed. */
|
||||
if (RIGHT_BUCKET(nbytes, nunits) || RIGHT_BUCKET(nbytes, nunits-1))
|
||||
{
|
||||
#if 0
|
||||
m = (char *)mem + p->mh_nbytes;
|
||||
#else
|
||||
/* Compensate for increment above. */
|
||||
m -= 4;
|
||||
#endif
|
||||
|
||||
*m++ = 0; *m++ = 0; *m++ = 0; *m++ = 0;
|
||||
m = (char *)mem + (p->mh_nbytes = n);
|
||||
|
||||
@@ -1120,11 +1120,7 @@ internal_memalign (alignment, size, file, line, flags)
|
||||
if (((long) ptr & (alignment - 1)) == 0)
|
||||
return ptr;
|
||||
/* Otherwise, get address of byte in the block that has that alignment. */
|
||||
#if 0
|
||||
aligned = (char *) (((long) ptr + alignment - 1) & -alignment);
|
||||
#else
|
||||
aligned = (char *) (((long) ptr + alignment - 1) & (~alignment + 1));
|
||||
#endif
|
||||
|
||||
/* Store a suitable indication of how to free the block,
|
||||
so that free can find the true beginning of it. */
|
||||
|
||||
Reference in New Issue
Block a user