mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-30 08:59:56 +02:00
commit bash-20070329 snapshot
This commit is contained in:
+2
-2
@@ -231,7 +231,7 @@ static int maxbuck; /* highest bucket receiving allocation request. */
|
||||
|
||||
static char *memtop; /* top of heap */
|
||||
|
||||
static unsigned long binsizes[NBUCKETS] = {
|
||||
static const unsigned long binsizes[NBUCKETS] = {
|
||||
8UL, 16UL, 32UL, 64UL, 128UL, 256UL, 512UL, 1024UL, 2048UL, 4096UL,
|
||||
8192UL, 16384UL, 32768UL, 65536UL, 131072UL, 262144UL, 524288UL,
|
||||
1048576UL, 2097152UL, 4194304UL, 8388608UL, 16777216UL, 33554432UL,
|
||||
@@ -312,7 +312,7 @@ xbotch (mem, e, s, file, line)
|
||||
int line;
|
||||
{
|
||||
fprintf (stderr, _("\r\nmalloc: %s:%d: assertion botched\r\n"),
|
||||
file ? file : "unknown", line);
|
||||
file ? file : _("unknown"), line);
|
||||
#ifdef MALLOC_REGISTER
|
||||
if (mem != NULL && malloc_register)
|
||||
mregister_describe_mem (mem, stderr);
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
#include "mstats.h"
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "imalloc.h"
|
||||
#include "table.h"
|
||||
|
||||
+6
-6
@@ -43,17 +43,17 @@ watch_warn (addr, file, line, type, data)
|
||||
char *tag;
|
||||
|
||||
if (type == W_ALLOC)
|
||||
tag = _("allocated");
|
||||
tag = "allocated";
|
||||
else if (type == W_FREE)
|
||||
tag = _("freed");
|
||||
tag = "freed";
|
||||
else if (type == W_REALLOC)
|
||||
tag = _("requesting resize");
|
||||
tag = "requesting resize";
|
||||
else if (type == W_RESIZED)
|
||||
tag = _("just resized");
|
||||
tag = "just resized";
|
||||
else
|
||||
tag = _("bug: unknown operation");
|
||||
tag = "bug: unknown operation";
|
||||
|
||||
fprintf (stderr, _("malloc: watch alert: %p %s "), addr, tag);
|
||||
fprintf (stderr, "malloc: watch alert: %p %s ", addr, tag);
|
||||
if (data != (unsigned long)-1)
|
||||
fprintf (stderr, "(size %lu) ", data);
|
||||
fprintf (stderr, "from '%s:%d'\n", file ? file : "unknown", line);
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
#
|
||||
# NOTE: we ignore `realloc' tags because they're just extra information
|
||||
#
|
||||
# Copyright (c) 2001 Chester Ramey
|
||||
# Permission is hereby granted to deal in this Software without restriction.
|
||||
# THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
|
||||
#
|
||||
# Chet Ramey
|
||||
# chet@po.cwru.edu
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user