mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-16 00:20:49 +02:00
remove files not in alpha distribution
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,890 +0,0 @@
|
||||
/* malloc.c - dynamic memory allocation for bash. */
|
||||
|
||||
/* Copyright (C) 1985, 1987, 1997 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
|
||||
|
||||
In other words, you are welcome to use, share and improve this program.
|
||||
You are forbidden to forbid anyone else to use, share and improve
|
||||
what you give them. Help stamp out software-hoarding! */
|
||||
|
||||
/*
|
||||
* @(#)nmalloc.c 1 (Caltech) 2/21/82
|
||||
*
|
||||
* U of M Modified: 20 Jun 1983 ACT: strange hacks for Emacs
|
||||
*
|
||||
* Nov 1983, Mike@BRL, Added support for 4.1C/4.2 BSD.
|
||||
*
|
||||
* This is a very fast storage allocator. It allocates blocks of a small
|
||||
* number of different sizes, and keeps free lists of each size. Blocks
|
||||
* that don't exactly fit are passed up to the next larger size. In this
|
||||
* implementation, the available sizes are (2^n)-4 (or -16) bytes long.
|
||||
* This is designed for use in a program that uses vast quantities of
|
||||
* memory, but bombs when it runs out. To make it a little better, it
|
||||
* warns the user when he starts to get near the end.
|
||||
*
|
||||
* June 84, ACT: modified rcheck code to check the range given to malloc,
|
||||
* rather than the range determined by the 2-power used.
|
||||
*
|
||||
* Jan 85, RMS: calls malloc_warning to issue warning on nearly full.
|
||||
* No longer Emacs-specific; can serve as all-purpose malloc for GNU.
|
||||
* You should call malloc_init to reinitialize after loading dumped Emacs.
|
||||
* Call malloc_stats to get info on memory stats if MALLOC_STATS turned on.
|
||||
* realloc knows how to return same block given, just changing its size,
|
||||
* if the power of 2 is correct.
|
||||
*/
|
||||
#define MALLOC_STATS /* for the time being */
|
||||
|
||||
/*
|
||||
* nextf[i] is the pointer to the next free block of size 2^(i+3). The
|
||||
* smallest allocatable block is 8 bytes. The overhead information will
|
||||
* go in the first int of the block, and the returned pointer will point
|
||||
* to the second.
|
||||
*/
|
||||
|
||||
/* XXX For the time being, until an autoconf test is created (ce has one) */
|
||||
#define bits32_t int
|
||||
#define u_bits32_t unsigned int
|
||||
|
||||
/* Define this to have free() write 0xcf into memory as it's freed, to
|
||||
uncover callers that refer to freed memory. */
|
||||
/* SCO 3.2v4 getcwd and possibly other libc routines fail with MEMSCRAMBLE */
|
||||
#if !defined (NO_MEMSCRAMBLE)
|
||||
# define MEMSCRAMBLE
|
||||
#endif
|
||||
|
||||
#if defined (HAVE_CONFIG_H)
|
||||
# include <config.h>
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#if defined (HAVE_UNISTD_H)
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
/* Determine which kind of system this is. */
|
||||
#if defined (SHELL)
|
||||
# include "bashtypes.h"
|
||||
#else
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
#include <signal.h>
|
||||
|
||||
#if defined (HAVE_STRING_H)
|
||||
# include <string.h>
|
||||
#else
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
#if defined (MALLOC_STATS) || !defined (botch)
|
||||
# include <stdio.h>
|
||||
#endif /* MALLOC_STATS || !botch */
|
||||
|
||||
/* Define getpagesize () if the system does not. */
|
||||
#ifndef HAVE_GETPAGESIZE
|
||||
# include "getpagesize.h"
|
||||
#endif
|
||||
|
||||
#if __GNUC__ > 1
|
||||
# define FASTCOPY(s, d, n) __builtin_memcpy (d, s, n)
|
||||
#else /* !__GNUC__ */
|
||||
# if !defined (HAVE_BCOPY)
|
||||
# if !defined (HAVE_MEMMOVE)
|
||||
# define FASTCOPY(s, d, n) memcpy (d, s, n)
|
||||
# else
|
||||
# define FASTCOPY(s, d, n) memmove (d, s, n)
|
||||
# endif /* !HAVE_MEMMOVE */
|
||||
# else /* HAVE_BCOPY */
|
||||
# define FASTCOPY(s, d, n) bcopy (s, d, n)
|
||||
# endif /* HAVE_BCOPY */
|
||||
#endif /* !__GNUC__ */
|
||||
|
||||
#if !defined (NULL)
|
||||
# define NULL 0
|
||||
#endif
|
||||
|
||||
#define NBUCKETS 30
|
||||
|
||||
#define ISALLOC ((char) 0xf7) /* magic byte that implies allocation */
|
||||
#define ISFREE ((char) 0x54) /* magic byte that implies free block */
|
||||
/* this is for error checking only */
|
||||
#define ISMEMALIGN ((char) 0xd6) /* Stored before the value returned by
|
||||
memalign, with the rest of the word
|
||||
being the distance to the true
|
||||
beginning of the block. */
|
||||
|
||||
#if !defined (SBRK_DECLARED)
|
||||
extern char *sbrk ();
|
||||
#endif /* !SBRK_DECLARED */
|
||||
|
||||
#ifdef MALLOC_STATS
|
||||
/*
|
||||
* NMALLOC[i] is the difference between the number of mallocs and frees
|
||||
* for a given block size. TMALLOC[i] is the total number of mallocs for
|
||||
* a given block size. NMORECORE[i] is the total number of calls to
|
||||
* morecore(i). NMAL and NFRE are counts of the number of calls to malloc()
|
||||
* and free(), respectively. NREALLOC is the total number of calls to
|
||||
* realloc(); NRCOPY is the number of times realloc() had to allocate new
|
||||
* memory and copy to it. NRECURSE is a count of the number of recursive
|
||||
* calls to malloc() for the same bucket size, which can be caused by calls
|
||||
* to malloc() from a signal handler. NSBRK is the number of calls to sbrk()
|
||||
* (whether by morecore() or for alignment); TSBRK is the total number of
|
||||
* bytes requested from the kernel with sbrk(). BYTESUSED is the total
|
||||
* number of bytes consumed by blocks currently in used; BYTESFREE is the
|
||||
* total number of bytes currently on all of the free lists. NBSPLIT is
|
||||
* the number of times a larger block was split to satisfy a smaller request.
|
||||
* NBCOALESCE is the number of times two adjacent smaller blocks off the free
|
||||
* list were combined to satisfy a larger request.
|
||||
*/
|
||||
struct _malstats {
|
||||
int nmalloc[NBUCKETS];
|
||||
int tmalloc[NBUCKETS];
|
||||
int nmorecore[NBUCKETS];
|
||||
int nmal;
|
||||
int nfre;
|
||||
int nrealloc;
|
||||
int nrcopy;
|
||||
int nrecurse;
|
||||
int nsbrk;
|
||||
bits32_t tsbrk;
|
||||
bits32_t bytesused;
|
||||
bits32_t bytesfree;
|
||||
int nbsplit;
|
||||
int nbcoalesce;
|
||||
};
|
||||
|
||||
static struct _malstats _mstats;
|
||||
|
||||
/* Return statistics describing allocation of blocks of size BLOCKSIZE.
|
||||
NFREE is the number of free blocks for this allocation size. NUSED
|
||||
is the number of blocks in use. NMAL is the number of requests for
|
||||
blocks of size BLOCKSIZE. NMORECORE is the number of times we had
|
||||
to call MORECORE to repopulate the free list for this bucket. */
|
||||
struct bucket_stats {
|
||||
u_bits32_t blocksize;
|
||||
int nfree;
|
||||
int nused;
|
||||
int nmal;
|
||||
int nmorecore;
|
||||
};
|
||||
#endif /* MALLOC_STATS */
|
||||
|
||||
/* We have a flag indicating whether memory is allocated, an index in
|
||||
nextf[], a size field, and a sentinel value to determine whether or
|
||||
not a caller wrote before the start of allocated memory; to realloc()
|
||||
memory we either copy mh_nbytes or just change mh_nbytes if there is
|
||||
enough room in the block for the new size. Range checking is always
|
||||
done. */
|
||||
struct mhead {
|
||||
char mh_alloc; /* ISALLOC or ISFREE */ /* 1 */
|
||||
char mh_index; /* index in nextf[] */ /* 1 */
|
||||
/* Remainder are valid only when block is allocated */
|
||||
u_bits32_t mh_nbytes; /* # of bytes allocated */ /* 4 */
|
||||
u_bits16_t mh_magic2;/* should be == MAGIC2 */ /* 2 */
|
||||
};
|
||||
|
||||
/* Access free-list pointer of a block.
|
||||
It is stored at block + sizeof (char *).
|
||||
This is not a field in the mhead structure
|
||||
because we want sizeof (struct mhead)
|
||||
to describe the overhead for when the block is in use,
|
||||
and we do not want the free-list pointer to count in that. */
|
||||
|
||||
#define CHAIN(a) \
|
||||
(*(struct mhead **) (sizeof (char *) + (char *) (a)))
|
||||
|
||||
#if defined (botch)
|
||||
extern void botch ();
|
||||
#else
|
||||
static void
|
||||
botch (s)
|
||||
char *s;
|
||||
{
|
||||
fprintf (stderr, "\r\nmalloc: assertion botched: %s\r\n", s);
|
||||
(void)fflush (stderr);
|
||||
abort ();
|
||||
}
|
||||
#endif /* !botch */
|
||||
|
||||
#if !defined (__STRING)
|
||||
# if defined (__STDC__)
|
||||
# define __STRING(x) #x
|
||||
# else
|
||||
# define __STRING(x) "x"
|
||||
# endif
|
||||
#endif /* !__STRING */
|
||||
|
||||
/* To implement range checking, we write magic values in at the beginning
|
||||
and end of each allocated block, and make sure they are undisturbed
|
||||
whenever a free or a realloc occurs. */
|
||||
|
||||
/* Written in each of the 4 bytes following the block's real space */
|
||||
#define MAGIC1 0x55
|
||||
/* Written in the 2 bytes before the block's real space */
|
||||
#define MAGIC2 0x5555
|
||||
#define ASSERT(p) do { if (!(p)) botch(__STRING(p)); } while (0)
|
||||
#define MSLOP 4 /* 4 bytes extra for MAGIC1s */
|
||||
|
||||
/* Minimum and maximum bucket indices for block splitting (and to bound
|
||||
the search for a block to split). */
|
||||
#define SPLIT_MIN 3
|
||||
#define SPLIT_MID 9
|
||||
#define SPLIT_MAX 12
|
||||
|
||||
/* Minimum and maximum bucket indices for block coalescing. */
|
||||
#define COMBINE_MIN 6
|
||||
#define COMBINE_MAX (pagebucket - 1)
|
||||
|
||||
#define MIN_COMBINE_FREE 4
|
||||
|
||||
/* nextf[i] is free list of blocks of size 2**(i + 3) */
|
||||
|
||||
static struct mhead *nextf[NBUCKETS];
|
||||
|
||||
/* busy[i] is nonzero while allocation of block size i is in progress. */
|
||||
|
||||
static char busy[NBUCKETS];
|
||||
|
||||
static int pagesz; /* system page size. */
|
||||
static int pagebucket; /* bucket for requests a page in size */
|
||||
|
||||
#if 0
|
||||
/* Coalesce two adjacent free blocks off the free list for size NU - 1,
|
||||
as long as there are at least MIN_COMBINE_FREE free blocks and we
|
||||
can find two adjacent free blocks. nextf[NU -1] is assumed to not
|
||||
be busy; the caller (morecore()) checks for this. */
|
||||
static void
|
||||
bcoalesce (nu)
|
||||
register int nu;
|
||||
{
|
||||
register struct mhead *mp, *mp1, *mp2;
|
||||
register int nfree, nbuck;
|
||||
unsigned long siz;
|
||||
|
||||
nbuck = nu - 1;
|
||||
if (nextf[nbuck] == 0)
|
||||
return;
|
||||
|
||||
nfree = 1;
|
||||
mp1 = nextf[nbuck];
|
||||
mp = CHAIN (mp1);
|
||||
mp2 = (struct mhead *)0;
|
||||
while (CHAIN (mp))
|
||||
{
|
||||
mp2 = mp1;
|
||||
mp1 = mp;
|
||||
mp = CHAIN (mp);
|
||||
nfree++;
|
||||
/* We may not want to run all the way through the free list here;
|
||||
if we do not, we need to check a threshold value here and break
|
||||
if nfree exceeds it. */
|
||||
}
|
||||
if (nfree < MIN_COMBINE_FREE)
|
||||
return;
|
||||
/* OK, now we have mp1 pointing to the block we want to add to nextf[NU].
|
||||
CHAIN(mp2) must equal mp1. Check that mp1 and mp are adjacent. */
|
||||
if (CHAIN(mp2) != mp1)
|
||||
botch ("bcoalesce: CHAIN(mp2) != mp1");
|
||||
siz = 1 << (nbuck + 3);
|
||||
if (CHAIN (mp1) != (struct mhead *)((char *)mp1 + siz))
|
||||
return; /* not adjacent */
|
||||
|
||||
#ifdef MALLOC_STATS
|
||||
_mstats.nbcoalesce++;
|
||||
#endif
|
||||
|
||||
/* Since they are adjacent, remove them from the free list */
|
||||
CHAIN (mp2) = CHAIN (mp);
|
||||
|
||||
/* And add the combined two blocks to nextf[NU]. */
|
||||
mp1->mh_alloc = ISFREE;
|
||||
mp1->mh_index = nu;
|
||||
CHAIN (mp1) = nextf[nu];
|
||||
nextf[nu] = mp1;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Split a block at index > NU (but less than SPLIT_MAX) into a set of
|
||||
blocks of the correct size, and attach them to nextf[NU]. nextf[NU]
|
||||
is assumed to be empty. Must be called with signals blocked (e.g.,
|
||||
by morecore()). */
|
||||
static void
|
||||
bsplit (nu)
|
||||
register int nu;
|
||||
{
|
||||
register struct mhead *mp;
|
||||
int nbuck, nblks;
|
||||
unsigned long siz;
|
||||
|
||||
if (nu >= SPLIT_MID)
|
||||
{
|
||||
for (nbuck = SPLIT_MAX; nbuck > nu; nbuck--)
|
||||
{
|
||||
if (busy[nbuck] || nextf[nbuck] == 0)
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (nbuck = nu + 1; nbuck <= SPLIT_MAX; nbuck++)
|
||||
{
|
||||
if (busy[nbuck] || nextf[nbuck] == 0)
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (nbuck > SPLIT_MAX || nbuck <= nu)
|
||||
return;
|
||||
|
||||
/* XXX might want to split only if nextf[nbuck] has >= 2 blocks free
|
||||
and nbuck is below some threshold. */
|
||||
|
||||
#ifdef MALLOC_STATS
|
||||
_mstats.nbsplit++;
|
||||
#endif
|
||||
|
||||
/* Figure out how many blocks we'll get. */
|
||||
siz = (1 << (nu + 3));
|
||||
nblks = (1 << (nbuck + 3)) / siz;
|
||||
|
||||
/* Remove the block from the chain of larger blocks. */
|
||||
mp = nextf[nbuck];
|
||||
nextf[nbuck] = CHAIN (mp);
|
||||
|
||||
/* Split the block and put it on the requested chain. */
|
||||
nextf[nu] = mp;
|
||||
while (1)
|
||||
{
|
||||
mp->mh_alloc = ISFREE;
|
||||
mp->mh_index = nu;
|
||||
if (--nblks <= 0) break;
|
||||
CHAIN (mp) = (struct mhead *)((char *)mp + siz);
|
||||
mp = (struct mhead *)((char *)mp + siz);
|
||||
}
|
||||
CHAIN (mp) = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
morecore (nu) /* ask system for more memory */
|
||||
register int nu; /* size index to get more of */
|
||||
{
|
||||
register struct mhead *mp;
|
||||
register int nblks;
|
||||
register long siz;
|
||||
long sbrk_amt; /* amount to get via sbrk() */
|
||||
|
||||
/* Block all signals in case we are executed from a signal handler. */
|
||||
#if defined (HAVE_BSD_SIGNALS)
|
||||
int oldmask;
|
||||
oldmask = sigsetmask (-1);
|
||||
#else
|
||||
# if defined (HAVE_POSIX_SIGNALS)
|
||||
sigset_t set, oset;
|
||||
sigfillset (&set);
|
||||
sigemptyset (&oset);
|
||||
sigprocmask (SIG_BLOCK, &set, &oset);
|
||||
# endif /* HAVE_POSIX_SIGNALS */
|
||||
#endif /* HAVE_BSD_SIGNALS */
|
||||
|
||||
siz = 1 << (nu + 3); /* size of desired block for nextf[nu] */
|
||||
|
||||
if (siz < 0)
|
||||
return; /* oops */
|
||||
|
||||
#ifdef MALLOC_STATS
|
||||
_mstats.nmorecore[nu]++;
|
||||
#endif
|
||||
|
||||
/* Try to split a larger block here, if we're within the range of sizes
|
||||
to split. */
|
||||
if (nu >= SPLIT_MIN && nu < SPLIT_MAX)
|
||||
{
|
||||
bsplit (nu);
|
||||
if (nextf[nu] != 0)
|
||||
goto morecore_done;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* Try to coalesce two adjacent blocks from the free list on nextf[nu - 1],
|
||||
if we can, and we're withing the range of the block coalescing limits. */
|
||||
if (nu >= COMBINE_MIN && nu < COMBINE_MAX && busy[nu - 1] == 0 && nextf[nu - 1])
|
||||
{
|
||||
bcoalesce (nu);
|
||||
if (nextf[nu] != 0)
|
||||
goto morecore_done;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Take at least a page, and figure out how many blocks of the requested
|
||||
size we're getting. */
|
||||
if (siz <= pagesz)
|
||||
{
|
||||
sbrk_amt = pagesz;
|
||||
nblks = sbrk_amt / siz;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* We always want to request an integral multiple of the page size
|
||||
from the kernel, so let's compute whether or not `siz' is such
|
||||
an amount. If it is, we can just request it. If not, we want
|
||||
the smallest integral multiple of pagesize that is larger than
|
||||
`siz' and will satisfy the request. */
|
||||
sbrk_amt = siz % pagesz;
|
||||
if (sbrk_amt == 0)
|
||||
sbrk_amt = siz;
|
||||
else
|
||||
sbrk_amt = siz + pagesz - sbrk_amt;
|
||||
nblks = 1;
|
||||
}
|
||||
|
||||
#ifdef MALLOC_STATS
|
||||
_mstats.nsbrk++;
|
||||
_mstats.tsbrk += sbrk_amt;
|
||||
#endif
|
||||
|
||||
mp = (struct mhead *) sbrk (sbrk_amt);
|
||||
|
||||
/* Totally out of memory. */
|
||||
if ((long)mp == -1)
|
||||
return;
|
||||
|
||||
/* shouldn't happen, but just in case */
|
||||
if ((long)mp & 7)
|
||||
{
|
||||
mp = (struct mhead *) (((long)mp + 8) & ~7);
|
||||
nblks--;
|
||||
}
|
||||
|
||||
/* save new header and link the nblks blocks together */
|
||||
nextf[nu] = mp;
|
||||
while (1)
|
||||
{
|
||||
mp->mh_alloc = ISFREE;
|
||||
mp->mh_index = nu;
|
||||
if (--nblks <= 0) break;
|
||||
CHAIN (mp) = (struct mhead *)((char *)mp + siz);
|
||||
mp = (struct mhead *)((char *)mp + siz);
|
||||
}
|
||||
CHAIN (mp) = 0;
|
||||
|
||||
morecore_done:
|
||||
#if defined (HAVE_BSD_SIGNALS)
|
||||
sigsetmask (oldmask);
|
||||
#else
|
||||
# if defined (HAVE_POSIX_SIGNALS)
|
||||
sigprocmask (SIG_SETMASK, &oset, (sigset_t *)NULL);
|
||||
# endif
|
||||
#endif /* HAVE_BSD_SIGNALS */
|
||||
}
|
||||
|
||||
#if defined (MEMSCRAMBLE) || !defined (NO_CALLOC)
|
||||
static char *
|
||||
zmemset (s, c, n)
|
||||
char *s;
|
||||
int c;
|
||||
register int n;
|
||||
{
|
||||
register char *sp;
|
||||
|
||||
sp = s;
|
||||
while (--n >= 0)
|
||||
*sp++ = c;
|
||||
return (s);
|
||||
}
|
||||
#endif /* MEMSCRAMBLE || !NO_CALLOC */
|
||||
|
||||
static void
|
||||
malloc_debug_dummy ()
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
char *
|
||||
malloc (n) /* get a block */
|
||||
size_t n;
|
||||
{
|
||||
register struct mhead *p;
|
||||
register long nbytes;
|
||||
register int nunits;
|
||||
|
||||
/* Get the system page size and align break pointer so everything will
|
||||
be page-aligned. The page size must be at least 1K -- anything
|
||||
smaller is increased. */
|
||||
if (pagesz == 0)
|
||||
{
|
||||
register long sbrk_needed;
|
||||
|
||||
pagesz = getpagesize ();
|
||||
if (pagesz < 1024)
|
||||
pagesz = 1024;
|
||||
/* OK, how much do we need to allocate to make things page-aligned?
|
||||
This partial page is wasted space. Once we figure out how much
|
||||
to advance the break pointer, go ahead and do it. */
|
||||
sbrk_needed = pagesz - ((long)sbrk (0) & (pagesz - 1)); /* sbrk(0) % pagesz */
|
||||
if (sbrk_needed < 0)
|
||||
sbrk_needed += pagesz;
|
||||
/* Now allocate the wasted space. */
|
||||
if (sbrk_needed)
|
||||
{
|
||||
#ifdef MALLOC_STATS
|
||||
_mstats.nsbrk++;
|
||||
_mstats.tsbrk += sbrk_needed;
|
||||
#endif
|
||||
if ((long)sbrk (sbrk_needed) == -1)
|
||||
return (NULL);
|
||||
}
|
||||
nunits = 0;
|
||||
nbytes = 8;
|
||||
while (pagesz > nbytes)
|
||||
{
|
||||
nbytes <<= 1;
|
||||
nunits++;
|
||||
}
|
||||
pagebucket = nunits;
|
||||
}
|
||||
|
||||
/* Figure out how many bytes are required, rounding up to the nearest
|
||||
multiple of 4, then figure out which nextf[] area to use. Try to
|
||||
be smart about where to start searching -- if the number of bytes
|
||||
needed is greater than the page size, we can start at pagebucket. */
|
||||
nbytes = (n + sizeof *p + MSLOP + 3) & ~3;
|
||||
nunits = 0;
|
||||
if (nbytes <= (pagesz >> 1))
|
||||
{
|
||||
register unsigned int shiftr;
|
||||
|
||||
shiftr = (nbytes - 1) >> 2; /* == (nbytes - 1) / 4 */
|
||||
while (shiftr >>= 1) /* == (nbytes - 1) / {8,16,32,...} */
|
||||
nunits++;
|
||||
}
|
||||
else
|
||||
{
|
||||
register u_bits32_t amt;
|
||||
|
||||
nunits = pagebucket;
|
||||
amt = pagesz;
|
||||
while (nbytes > amt)
|
||||
{
|
||||
amt <<= 1;
|
||||
nunits++;
|
||||
}
|
||||
}
|
||||
|
||||
/* In case this is reentrant use of malloc from signal handler,
|
||||
pick a block size that no other malloc level is currently
|
||||
trying to allocate. That's the easiest harmless way not to
|
||||
interfere with the other level of execution. */
|
||||
#ifdef MALLOC_STATS
|
||||
if (busy[nunits]) _mstats.nrecurse++;
|
||||
#endif
|
||||
while (busy[nunits]) nunits++;
|
||||
busy[nunits] = 1;
|
||||
|
||||
/* If there are no blocks of the appropriate size, go get some */
|
||||
if (nextf[nunits] == 0)
|
||||
morecore (nunits);
|
||||
|
||||
/* Get one block off the list, and set the new list head */
|
||||
if ((p = nextf[nunits]) == NULL)
|
||||
{
|
||||
busy[nunits] = 0;
|
||||
return NULL;
|
||||
}
|
||||
nextf[nunits] = CHAIN (p);
|
||||
busy[nunits] = 0;
|
||||
|
||||
/* Check for free block clobbered */
|
||||
/* If not for this check, we would gobble a clobbered free chain ptr
|
||||
and bomb out on the NEXT allocate of this size block */
|
||||
if (p->mh_alloc != ISFREE || p->mh_index != nunits)
|
||||
botch ("malloc: block on free list clobbered");
|
||||
|
||||
/* Fill in the info, and if range checking, set up the magic numbers */
|
||||
p->mh_alloc = ISALLOC;
|
||||
p->mh_nbytes = n;
|
||||
p->mh_magic2 = MAGIC2;
|
||||
{
|
||||
register char *m = (char *) (p + 1) + n;
|
||||
|
||||
*m++ = MAGIC1, *m++ = MAGIC1, *m++ = MAGIC1, *m = MAGIC1;
|
||||
}
|
||||
|
||||
#ifdef MEMSCRAMBLE
|
||||
zmemset ((char *)(p + 1), 0xdf, n); /* scramble previous contents */
|
||||
#endif
|
||||
#ifdef MALLOC_STATS
|
||||
_mstats.nmalloc[nunits]++;
|
||||
_mstats.tmalloc[nunits]++;
|
||||
_mstats.nmal++;
|
||||
#endif /* MALLOC_STATS */
|
||||
return (char *) (p + 1);
|
||||
}
|
||||
|
||||
void
|
||||
free (mem)
|
||||
char *mem;
|
||||
{
|
||||
register struct mhead *p;
|
||||
register char *ap;
|
||||
register int nunits;
|
||||
|
||||
if ((ap = mem) == 0)
|
||||
return;
|
||||
|
||||
p = (struct mhead *) ap - 1;
|
||||
|
||||
if (p->mh_alloc == ISMEMALIGN)
|
||||
{
|
||||
ap -= p->mh_nbytes;
|
||||
p = (struct mhead *) ap - 1;
|
||||
}
|
||||
|
||||
if (p->mh_alloc != ISALLOC)
|
||||
{
|
||||
if (p->mh_alloc == ISFREE)
|
||||
botch ("free: called with already freed block argument");
|
||||
else
|
||||
botch ("free: called with unallocated block argument");
|
||||
}
|
||||
|
||||
ASSERT (p->mh_magic2 == MAGIC2);
|
||||
ap += p->mh_nbytes;
|
||||
ASSERT (*ap++ == MAGIC1); ASSERT (*ap++ == MAGIC1);
|
||||
ASSERT (*ap++ == MAGIC1); ASSERT (*ap == MAGIC1);
|
||||
|
||||
#ifdef MEMSCRAMBLE
|
||||
zmemset (mem, 0xcf, p->mh_nbytes);
|
||||
#endif
|
||||
|
||||
nunits = p->mh_index;
|
||||
|
||||
ASSERT (nunits < NBUCKETS);
|
||||
p->mh_alloc = ISFREE;
|
||||
|
||||
/* Protect against signal handlers calling malloc. */
|
||||
busy[nunits] = 1;
|
||||
/* Put this block on the free list. */
|
||||
CHAIN (p) = nextf[nunits];
|
||||
nextf[nunits] = p;
|
||||
busy[nunits] = 0;
|
||||
|
||||
#ifdef MALLOC_STATS
|
||||
_mstats.nmalloc[nunits]--;
|
||||
_mstats.nfre++;
|
||||
#endif /* MALLOC_STATS */
|
||||
}
|
||||
|
||||
char *
|
||||
realloc (mem, n)
|
||||
char *mem;
|
||||
register size_t n;
|
||||
{
|
||||
register struct mhead *p;
|
||||
register u_bits32_t tocopy;
|
||||
register unsigned int nbytes;
|
||||
register int nunits;
|
||||
register char *m;
|
||||
|
||||
#ifdef MALLOC_STATS
|
||||
_mstats.nrealloc++;
|
||||
#endif
|
||||
|
||||
if (n == 0)
|
||||
{
|
||||
free (mem);
|
||||
return (NULL);
|
||||
}
|
||||
if ((p = (struct mhead *) mem) == 0)
|
||||
return malloc (n);
|
||||
p--;
|
||||
nunits = p->mh_index;
|
||||
ASSERT (p->mh_alloc == ISALLOC);
|
||||
ASSERT (p->mh_magic2 == MAGIC2);
|
||||
|
||||
m = mem + (tocopy = p->mh_nbytes);
|
||||
ASSERT (*m++ == MAGIC1); ASSERT (*m++ == MAGIC1);
|
||||
ASSERT (*m++ == MAGIC1); ASSERT (*m == MAGIC1);
|
||||
|
||||
/* See if desired size rounds to same power of 2 as actual size. */
|
||||
nbytes = (n + sizeof *p + MSLOP + 7) & ~7;
|
||||
|
||||
/* If ok, use the same block, just marking its size as changed. */
|
||||
if (nbytes > (4 << nunits) && nbytes <= (8 << nunits))
|
||||
{
|
||||
m = mem + tocopy;
|
||||
*m++ = 0; *m++ = 0; *m++ = 0; *m++ = 0;
|
||||
p->mh_nbytes = n;
|
||||
m = mem + n;
|
||||
*m++ = MAGIC1; *m++ = MAGIC1; *m++ = MAGIC1; *m++ = MAGIC1;
|
||||
return mem;
|
||||
}
|
||||
|
||||
#ifdef MALLOC_STATS
|
||||
_mstats.nrcopy++;
|
||||
#endif
|
||||
|
||||
if (n < tocopy)
|
||||
tocopy = n;
|
||||
|
||||
if ((m = malloc (n)) == 0)
|
||||
return 0;
|
||||
FASTCOPY (mem, m, tocopy);
|
||||
free (mem);
|
||||
return m;
|
||||
}
|
||||
|
||||
char *
|
||||
memalign (alignment, size)
|
||||
unsigned int alignment;
|
||||
size_t size;
|
||||
{
|
||||
register char *ptr;
|
||||
register char *aligned;
|
||||
register struct mhead *p;
|
||||
|
||||
ptr = malloc (size + alignment);
|
||||
|
||||
if (ptr == 0)
|
||||
return 0;
|
||||
/* If entire block has the desired alignment, just accept it. */
|
||||
if (((int) ptr & (alignment - 1)) == 0)
|
||||
return ptr;
|
||||
/* Otherwise, get address of byte in the block that has that alignment. */
|
||||
aligned = (char *) (((int) ptr + alignment - 1) & -alignment);
|
||||
|
||||
/* Store a suitable indication of how to free the block,
|
||||
so that free can find the true beginning of it. */
|
||||
p = (struct mhead *) aligned - 1;
|
||||
p->mh_nbytes = aligned - ptr;
|
||||
p->mh_alloc = ISMEMALIGN;
|
||||
return aligned;
|
||||
}
|
||||
|
||||
#if !defined (HPUX)
|
||||
/* This runs into trouble with getpagesize on HPUX, and Multimax machines.
|
||||
Patching out seems cleaner than the ugly fix needed. */
|
||||
#if defined (__STDC__)
|
||||
void *
|
||||
#else
|
||||
char *
|
||||
#endif
|
||||
valloc (size)
|
||||
size_t size;
|
||||
{
|
||||
return memalign (getpagesize (), size);
|
||||
}
|
||||
#endif /* !HPUX */
|
||||
|
||||
#ifndef NO_CALLOC
|
||||
char *
|
||||
calloc (n, s)
|
||||
size_t n, s;
|
||||
{
|
||||
size_t total;
|
||||
char *result;
|
||||
|
||||
total = n * s;
|
||||
result = malloc (total);
|
||||
if (result)
|
||||
zmemset (result, 0, total);
|
||||
return result;
|
||||
}
|
||||
|
||||
void
|
||||
cfree (p)
|
||||
char *p;
|
||||
{
|
||||
free (p);
|
||||
}
|
||||
#endif /* !NO_CALLOC */
|
||||
|
||||
#ifdef MALLOC_STATS
|
||||
|
||||
struct bucket_stats
|
||||
malloc_bucket_stats (size)
|
||||
int size;
|
||||
{
|
||||
struct bucket_stats v;
|
||||
register struct mhead *p;
|
||||
|
||||
v.nfree = 0;
|
||||
|
||||
if (size < 0 || size >= NBUCKETS)
|
||||
{
|
||||
v.blocksize = 0;
|
||||
v.nused = v.nmal = 0;
|
||||
return v;
|
||||
}
|
||||
|
||||
v.blocksize = 1 << (size + 3);
|
||||
v.nused = _mstats.nmalloc[size];
|
||||
v.nmal = _mstats.tmalloc[size];
|
||||
v.nmorecore = _mstats.nmorecore[size];
|
||||
|
||||
for (p = nextf[size]; p; p = CHAIN (p))
|
||||
v.nfree++;
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
/* Return a copy of _MSTATS, with two additional fields filled in:
|
||||
BYTESFREE is the total number of bytes on free lists. BYTESUSED
|
||||
is the total number of bytes in use. These two fields are fairly
|
||||
expensive to compute, so we do it only when asked to. */
|
||||
struct _malstats
|
||||
malloc_stats ()
|
||||
{
|
||||
struct _malstats result;
|
||||
struct bucket_stats v;
|
||||
register int i;
|
||||
|
||||
result = _mstats;
|
||||
result.bytesused = result.bytesfree = 0;
|
||||
for (i = 0; i < NBUCKETS; i++)
|
||||
{
|
||||
v = malloc_bucket_stats (i);
|
||||
result.bytesfree += v.nfree * v.blocksize;
|
||||
result.bytesused += v.nused * v.blocksize;
|
||||
}
|
||||
return (result);
|
||||
}
|
||||
|
||||
void
|
||||
print_malloc_stats (s)
|
||||
char *s;
|
||||
{
|
||||
register int i;
|
||||
int totused, totfree;
|
||||
struct bucket_stats v;
|
||||
|
||||
fprintf (stderr, "Memory allocation statistics: %s\n\tsize\tfree\tin use\ttotal\tmorecore\n", s ? s : "");
|
||||
for (i = totused = totfree = 0; i < NBUCKETS; i++)
|
||||
{
|
||||
v = malloc_bucket_stats (i);
|
||||
fprintf (stderr, "%12lu\t%4d\t%6d\t%5d\t%8d\n", v.blocksize, v.nfree, v.nused, v.nmal, v.nmorecore);
|
||||
totfree += v.nfree * v.blocksize;
|
||||
totused += v.nused * v.blocksize;
|
||||
}
|
||||
fprintf (stderr, "\nTotal bytes in use: %d, total bytes free: %d\n",
|
||||
totused, totfree);
|
||||
fprintf (stderr, "Total mallocs: %d, total frees: %d, total reallocs: %d (%d copies)\n",
|
||||
_mstats.nmal, _mstats.nfre, _mstats.nrealloc, _mstats.nrcopy);
|
||||
fprintf (stderr, "Total sbrks: %d, total bytes via sbrk: %d\n",
|
||||
_mstats.nsbrk, _mstats.tsbrk);
|
||||
fprintf (stderr, "Total blocks split: %d, total block coalesces: %d\n",
|
||||
_mstats.nbsplit, _mstats.nbcoalesce);
|
||||
}
|
||||
#endif /* MALLOC_STATS */
|
||||
@@ -1,759 +0,0 @@
|
||||
/* dynamic memory allocation for GNU. */
|
||||
|
||||
/* Copyright (C) 1985, 1987 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
|
||||
|
||||
In other words, you are welcome to use, share and improve this program.
|
||||
You are forbidden to forbid anyone else to use, share and improve
|
||||
what you give them. Help stamp out software-hoarding! */
|
||||
|
||||
/*
|
||||
* @(#)nmalloc.c 1 (Caltech) 2/21/82
|
||||
*
|
||||
* U of M Modified: 20 Jun 1983 ACT: strange hacks for Emacs
|
||||
*
|
||||
* Nov 1983, Mike@BRL, Added support for 4.1C/4.2 BSD.
|
||||
*
|
||||
* This is a very fast storage allocator. It allocates blocks of a small
|
||||
* number of different sizes, and keeps free lists of each size. Blocks
|
||||
* that don't exactly fit are passed up to the next larger size. In this
|
||||
* implementation, the available sizes are (2^n)-4 (or -16) bytes long.
|
||||
* This is designed for use in a program that uses vast quantities of
|
||||
* memory, but bombs when it runs out. To make it a little better, it
|
||||
* warns the user when he starts to get near the end.
|
||||
*
|
||||
* June 84, ACT: modified rcheck code to check the range given to malloc,
|
||||
* rather than the range determined by the 2-power used.
|
||||
*
|
||||
* Jan 85, RMS: calls malloc_warning to issue warning on nearly full.
|
||||
* No longer Emacs-specific; can serve as all-purpose malloc for GNU.
|
||||
* You should call malloc_init to reinitialize after loading dumped Emacs.
|
||||
* Call malloc_stats to get info on memory stats if MSTATS turned on.
|
||||
* realloc knows how to return same block given, just changing its size,
|
||||
* if the power of 2 is correct.
|
||||
*/
|
||||
|
||||
/*
|
||||
* nextf[i] is the pointer to the next free block of size 2^(i+3). The
|
||||
* smallest allocatable block is 8 bytes. The overhead information will
|
||||
* go in the first int of the block, and the returned pointer will point
|
||||
* to the second.
|
||||
*
|
||||
#ifdef MSTATS
|
||||
* nmalloc[i] is the difference between the number of mallocs and frees
|
||||
* for a given block size.
|
||||
#endif
|
||||
*/
|
||||
|
||||
/* Define this to have free() write 0xcf into memory as it's freed, to
|
||||
uncover callers that refer to freed memory. */
|
||||
/* SCO 3.2v4 getcwd and possibly other libc routines fail with MEMSCRAMBLE */
|
||||
#if !defined (NO_MEMSCRAMBLE)
|
||||
# define MEMSCRAMBLE
|
||||
#endif
|
||||
|
||||
#if defined (emacs) || defined (HAVE_CONFIG_H)
|
||||
# include <config.h>
|
||||
#endif /* emacs */
|
||||
|
||||
#if defined (HAVE_UNISTD_H)
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
/* Determine which kind of system this is. */
|
||||
#if defined (SHELL)
|
||||
# include "bashtypes.h"
|
||||
#else
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
#include <signal.h>
|
||||
|
||||
/* Define getpagesize () if the system does not. */
|
||||
#ifndef HAVE_GETPAGESIZE
|
||||
# include "getpagesize.h"
|
||||
#endif
|
||||
|
||||
#if defined (HAVE_RESOURCE)
|
||||
# include <sys/time.h>
|
||||
# include <sys/resource.h>
|
||||
#endif /* HAVE_RESOURCE */
|
||||
|
||||
/* Check for the needed symbols. If they aren't present, this
|
||||
system's <sys/resource.h> isn't very useful to us. */
|
||||
#if !defined (RLIMIT_DATA)
|
||||
# undef HAVE_RESOURCE
|
||||
#endif
|
||||
|
||||
#if __GNUC__ > 1
|
||||
# define FASTCOPY(s, d, n) __builtin_memcpy (d, s, n)
|
||||
#else /* !__GNUC__ */
|
||||
# if !defined (HAVE_BCOPY)
|
||||
# if !defined (HAVE_MEMMOVE)
|
||||
# define FASTCOPY(s, d, n) memcpy (d, s, n)
|
||||
# else
|
||||
# define FASTCOPY(s, d, n) memmove (d, s, n)
|
||||
# endif /* !HAVE_MEMMOVE */
|
||||
# else /* HAVE_BCOPY */
|
||||
# define FASTCOPY(s, d, n) bcopy (s, d, n)
|
||||
# endif /* HAVE_BCOPY */
|
||||
#endif /* !__GNUC__ */
|
||||
|
||||
#if !defined (NULL)
|
||||
# define NULL 0
|
||||
#endif
|
||||
|
||||
#define start_of_data() &etext
|
||||
|
||||
#define ISALLOC ((char) 0xf7) /* magic byte that implies allocation */
|
||||
#define ISFREE ((char) 0x54) /* magic byte that implies free block */
|
||||
/* this is for error checking only */
|
||||
#define ISMEMALIGN ((char) 0xd6) /* Stored before the value returned by
|
||||
memalign, with the rest of the word
|
||||
being the distance to the true
|
||||
beginning of the block. */
|
||||
extern char etext;
|
||||
|
||||
#if !defined (SBRK_DECLARED)
|
||||
extern char *sbrk ();
|
||||
#endif /* !SBRK_DECLARED */
|
||||
|
||||
/* These two are for user programs to look at, when they are interested. */
|
||||
unsigned int malloc_sbrk_used; /* amount of data space used now */
|
||||
unsigned int malloc_sbrk_unused; /* amount more we can have */
|
||||
|
||||
/* start of data space; can be changed by calling init_malloc */
|
||||
static char *data_space_start;
|
||||
|
||||
static void get_lim_data ();
|
||||
|
||||
#ifdef MSTATS
|
||||
static int nmalloc[30];
|
||||
static int nmal, nfre;
|
||||
#endif /* MSTATS */
|
||||
|
||||
/* If range checking is not turned on, all we have is a flag indicating
|
||||
whether memory is allocated, an index in nextf[], and a size field; to
|
||||
realloc() memory we copy either size bytes or 1<<(index+3) bytes depending
|
||||
on whether the former can hold the exact size (given the value of
|
||||
'index'). If range checking is on, we always need to know how much space
|
||||
is allocated, so the 'size' field is never used. */
|
||||
|
||||
struct mhead {
|
||||
char mh_alloc; /* ISALLOC or ISFREE */
|
||||
char mh_index; /* index in nextf[] */
|
||||
/* Remainder are valid only when block is allocated */
|
||||
unsigned short mh_size; /* size, if < 0x10000 */
|
||||
#ifdef RCHECK
|
||||
unsigned int mh_nbytes; /* number of bytes allocated */
|
||||
int mh_magic4; /* should be == MAGIC4 */
|
||||
#endif /* RCHECK */
|
||||
};
|
||||
|
||||
/* Access free-list pointer of a block.
|
||||
It is stored at block + 4.
|
||||
This is not a field in the mhead structure
|
||||
because we want sizeof (struct mhead)
|
||||
to describe the overhead for when the block is in use,
|
||||
and we do not want the free-list pointer to count in that. */
|
||||
|
||||
#define CHAIN(a) \
|
||||
(*(struct mhead **) (sizeof (char *) + (char *) (a)))
|
||||
|
||||
#ifdef RCHECK
|
||||
# include <stdio.h>
|
||||
# if !defined (botch)
|
||||
# define botch(x) abort ()
|
||||
# else
|
||||
extern void botch();
|
||||
# endif /* botch */
|
||||
|
||||
# if !defined (__STRING)
|
||||
# if defined (__STDC__)
|
||||
# define __STRING(x) #x
|
||||
# else
|
||||
# define __STRING(x) "x"
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/* To implement range checking, we write magic values in at the beginning
|
||||
and end of each allocated block, and make sure they are undisturbed
|
||||
whenever a free or a realloc occurs. */
|
||||
|
||||
/* Written in each of the 4 bytes following the block's real space */
|
||||
# define MAGIC1 0x55
|
||||
/* Written in the 4 bytes before the block's real space */
|
||||
# define MAGIC4 0x55555555
|
||||
# define ASSERT(p) if (!(p)) botch(__STRING(p)); else
|
||||
# define EXTRA 4 /* 4 bytes extra for MAGIC1s */
|
||||
#else /* !RCHECK */
|
||||
# define ASSERT(p)
|
||||
# define EXTRA 0
|
||||
#endif /* RCHECK */
|
||||
|
||||
/* nextf[i] is free list of blocks of size 2**(i + 3) */
|
||||
|
||||
static struct mhead *nextf[30];
|
||||
|
||||
/* busy[i] is nonzero while allocation of block size i is in progress. */
|
||||
|
||||
static char busy[30];
|
||||
|
||||
/* Number of bytes of writable memory we can expect to be able to get */
|
||||
static unsigned int lim_data;
|
||||
|
||||
/* Level number of warnings already issued.
|
||||
0 -- no warnings issued.
|
||||
1 -- 75% warning already issued.
|
||||
2 -- 85% warning already issued.
|
||||
*/
|
||||
static int warnlevel;
|
||||
|
||||
/* Function to call to issue a warning;
|
||||
0 means don't issue them. */
|
||||
static void (*warnfunction) ();
|
||||
|
||||
/* nonzero once initial bunch of free blocks made */
|
||||
static int gotpool;
|
||||
|
||||
char *_malloc_base;
|
||||
|
||||
static void getpool ();
|
||||
|
||||
/* Cause reinitialization based on job parameters;
|
||||
also declare where the end of pure storage is. */
|
||||
void
|
||||
malloc_init (start, warnfun)
|
||||
char *start;
|
||||
void (*warnfun) ();
|
||||
{
|
||||
if (start)
|
||||
data_space_start = start;
|
||||
lim_data = 0;
|
||||
warnlevel = 0;
|
||||
warnfunction = warnfun;
|
||||
}
|
||||
|
||||
/* Return the maximum size to which MEM can be realloc'd
|
||||
without actually requiring copying. */
|
||||
|
||||
int
|
||||
malloc_usable_size (mem)
|
||||
char *mem;
|
||||
{
|
||||
int blocksize = 8 << (((struct mhead *) mem) - 1) -> mh_index;
|
||||
|
||||
return blocksize - sizeof (struct mhead) - EXTRA;
|
||||
}
|
||||
|
||||
static void
|
||||
morecore (nu) /* ask system for more memory */
|
||||
register int nu; /* size index to get more of */
|
||||
{
|
||||
register char *cp;
|
||||
register int nblks;
|
||||
register unsigned int siz;
|
||||
|
||||
/* Block all signals in case we are executed from a signal handler. */
|
||||
#if defined (HAVE_BSD_SIGNALS)
|
||||
int oldmask;
|
||||
oldmask = sigsetmask (-1);
|
||||
#else
|
||||
# if defined (HAVE_POSIX_SIGNALS)
|
||||
sigset_t set, oset;
|
||||
sigfillset (&set);
|
||||
sigemptyset (&oset);
|
||||
sigprocmask (SIG_BLOCK, &set, &oset);
|
||||
# endif /* HAVE_POSIX_SIGNALS */
|
||||
#endif /* HAVE_BSD_SIGNALS */
|
||||
|
||||
if (!data_space_start)
|
||||
{
|
||||
data_space_start = start_of_data ();
|
||||
}
|
||||
|
||||
if (lim_data == 0)
|
||||
get_lim_data ();
|
||||
|
||||
/* On initial startup, get two blocks of each size up to 1k bytes */
|
||||
if (!gotpool)
|
||||
{ getpool (); getpool (); gotpool = 1; }
|
||||
|
||||
/* Find current end of memory and issue warning if getting near max */
|
||||
|
||||
cp = sbrk (0);
|
||||
siz = cp - data_space_start;
|
||||
malloc_sbrk_used = siz;
|
||||
malloc_sbrk_unused = lim_data - siz;
|
||||
|
||||
if (warnfunction)
|
||||
switch (warnlevel)
|
||||
{
|
||||
case 0:
|
||||
if (siz > (lim_data / 4) * 3)
|
||||
{
|
||||
warnlevel++;
|
||||
(*warnfunction) ("Warning: past 75% of memory limit");
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (siz > (lim_data / 20) * 17)
|
||||
{
|
||||
warnlevel++;
|
||||
(*warnfunction) ("Warning: past 85% of memory limit");
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (siz > (lim_data / 20) * 19)
|
||||
{
|
||||
warnlevel++;
|
||||
(*warnfunction) ("Warning: past 95% of memory limit");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if ((int) cp & 0x3ff) /* land on 1K boundaries */
|
||||
sbrk (1024 - ((int) cp & 0x3ff));
|
||||
|
||||
/* Take at least 2k, and figure out how many blocks of the desired size
|
||||
we're about to get */
|
||||
nblks = 1;
|
||||
if ((siz = nu) < 8)
|
||||
nblks = 1 << ((siz = 8) - nu);
|
||||
|
||||
if ((cp = sbrk (1 << (siz + 3))) == (char *) -1)
|
||||
return; /* no more room! */
|
||||
|
||||
if ((int) cp & 7)
|
||||
{ /* shouldn't happen, but just in case */
|
||||
cp = (char *) (((int) cp + 8) & ~7);
|
||||
nblks--;
|
||||
}
|
||||
|
||||
/* save new header and link the nblks blocks together */
|
||||
nextf[nu] = (struct mhead *) cp;
|
||||
siz = 1 << (nu + 3);
|
||||
while (1)
|
||||
{
|
||||
((struct mhead *) cp) -> mh_alloc = ISFREE;
|
||||
((struct mhead *) cp) -> mh_index = nu;
|
||||
if (--nblks <= 0) break;
|
||||
CHAIN ((struct mhead *) cp) = (struct mhead *) (cp + siz);
|
||||
cp += siz;
|
||||
}
|
||||
CHAIN ((struct mhead *) cp) = 0;
|
||||
|
||||
#if defined (HAVE_BSD_SIGNALS)
|
||||
sigsetmask (oldmask);
|
||||
#else
|
||||
# if defined (HAVE_POSIX_SIGNALS)
|
||||
sigprocmask (SIG_SETMASK, &oset, (sigset_t *)NULL);
|
||||
# endif
|
||||
#endif /* HAVE_BSD_SIGNALS */
|
||||
}
|
||||
|
||||
static void
|
||||
getpool ()
|
||||
{
|
||||
register int nu;
|
||||
register char *cp = sbrk (0);
|
||||
|
||||
if ((int) cp & 0x3ff) /* land on 1K boundaries */
|
||||
sbrk (1024 - ((int) cp & 0x3ff));
|
||||
|
||||
/* Record address of start of space allocated by malloc. */
|
||||
if (_malloc_base == 0)
|
||||
_malloc_base = cp;
|
||||
|
||||
/* Get 2k of storage */
|
||||
|
||||
cp = sbrk (04000);
|
||||
if (cp == (char *) -1)
|
||||
return;
|
||||
|
||||
/* Divide it into an initial 8-word block
|
||||
plus one block of size 2**nu for nu = 3 ... 10. */
|
||||
|
||||
CHAIN (cp) = nextf[0];
|
||||
nextf[0] = (struct mhead *) cp;
|
||||
((struct mhead *) cp) -> mh_alloc = ISFREE;
|
||||
((struct mhead *) cp) -> mh_index = 0;
|
||||
cp += 8;
|
||||
|
||||
for (nu = 0; nu < 7; nu++)
|
||||
{
|
||||
CHAIN (cp) = nextf[nu];
|
||||
nextf[nu] = (struct mhead *) cp;
|
||||
((struct mhead *) cp) -> mh_alloc = ISFREE;
|
||||
((struct mhead *) cp) -> mh_index = nu;
|
||||
cp += 8 << nu;
|
||||
}
|
||||
}
|
||||
|
||||
#if defined (MEMSCRAMBLE) || !defined (NO_CALLOC)
|
||||
static char *
|
||||
zmemset (s, c, n)
|
||||
char *s;
|
||||
int c;
|
||||
register int n;
|
||||
{
|
||||
register char *sp;
|
||||
|
||||
sp = s;
|
||||
while (--n >= 0)
|
||||
*sp++ = c;
|
||||
return (s);
|
||||
}
|
||||
#endif /* MEMSCRAMBLE || !NO_CALLOC */
|
||||
|
||||
char *
|
||||
malloc (n) /* get a block */
|
||||
unsigned int n;
|
||||
{
|
||||
register struct mhead *p;
|
||||
register unsigned int nbytes;
|
||||
register int nunits = 0;
|
||||
|
||||
/* Figure out how many bytes are required, rounding up to the nearest
|
||||
multiple of 4, then figure out which nextf[] area to use */
|
||||
nbytes = (n + sizeof *p + EXTRA + 3) & ~3;
|
||||
{
|
||||
register unsigned int shiftr = (nbytes - 1) >> 2;
|
||||
|
||||
while (shiftr >>= 1)
|
||||
nunits++;
|
||||
}
|
||||
|
||||
/* In case this is reentrant use of malloc from signal handler,
|
||||
pick a block size that no other malloc level is currently
|
||||
trying to allocate. That's the easiest harmless way not to
|
||||
interfere with the other level of execution. */
|
||||
while (busy[nunits]) nunits++;
|
||||
busy[nunits] = 1;
|
||||
|
||||
/* If there are no blocks of the appropriate size, go get some */
|
||||
/* COULD SPLIT UP A LARGER BLOCK HERE ... ACT */
|
||||
if (nextf[nunits] == 0)
|
||||
morecore (nunits);
|
||||
|
||||
/* Get one block off the list, and set the new list head */
|
||||
if ((p = nextf[nunits]) == 0)
|
||||
{
|
||||
busy[nunits] = 0;
|
||||
return 0;
|
||||
}
|
||||
nextf[nunits] = CHAIN (p);
|
||||
busy[nunits] = 0;
|
||||
|
||||
/* Check for free block clobbered */
|
||||
/* If not for this check, we would gobble a clobbered free chain ptr */
|
||||
/* and bomb out on the NEXT allocate of this size block */
|
||||
if (p -> mh_alloc != ISFREE || p -> mh_index != nunits)
|
||||
#ifdef RCHECK
|
||||
botch ("block on free list clobbered");
|
||||
#else /* not RCHECK */
|
||||
abort ();
|
||||
#endif /* not RCHECK */
|
||||
|
||||
/* Fill in the info, and if range checking, set up the magic numbers */
|
||||
p -> mh_alloc = ISALLOC;
|
||||
#ifdef RCHECK
|
||||
p -> mh_nbytes = n;
|
||||
p -> mh_magic4 = MAGIC4;
|
||||
{
|
||||
register char *m = (char *) (p + 1) + n;
|
||||
|
||||
*m++ = MAGIC1, *m++ = MAGIC1, *m++ = MAGIC1, *m = MAGIC1;
|
||||
}
|
||||
#else /* not RCHECK */
|
||||
p -> mh_size = n;
|
||||
#endif /* not RCHECK */
|
||||
#ifdef MEMSCRAMBLE
|
||||
zmemset ((char *)(p + 1), 0xdf, n); /* scramble previous contents */
|
||||
#endif
|
||||
#ifdef MSTATS
|
||||
nmalloc[nunits]++;
|
||||
nmal++;
|
||||
#endif /* MSTATS */
|
||||
return (char *) (p + 1);
|
||||
}
|
||||
|
||||
void
|
||||
free (mem)
|
||||
char *mem;
|
||||
{
|
||||
register struct mhead *p;
|
||||
{
|
||||
register char *ap = mem;
|
||||
|
||||
if (ap == 0)
|
||||
return;
|
||||
|
||||
p = (struct mhead *) ap - 1;
|
||||
|
||||
if (p -> mh_alloc == ISMEMALIGN)
|
||||
{
|
||||
#ifdef RCHECK
|
||||
ap -= p->mh_nbytes;
|
||||
#else
|
||||
ap -= p->mh_size; /* XXX */
|
||||
#endif
|
||||
p = (struct mhead *) ap - 1;
|
||||
}
|
||||
|
||||
#ifndef RCHECK
|
||||
if (p -> mh_alloc != ISALLOC)
|
||||
abort ();
|
||||
|
||||
#else /* RCHECK */
|
||||
if (p -> mh_alloc != ISALLOC)
|
||||
{
|
||||
if (p -> mh_alloc == ISFREE)
|
||||
botch ("free: Called with already freed block argument\n");
|
||||
else
|
||||
botch ("free: Called with unallocated block argument\n");
|
||||
}
|
||||
|
||||
ASSERT (p -> mh_magic4 == MAGIC4);
|
||||
ap += p -> mh_nbytes;
|
||||
ASSERT (*ap++ == MAGIC1); ASSERT (*ap++ == MAGIC1);
|
||||
ASSERT (*ap++ == MAGIC1); ASSERT (*ap == MAGIC1);
|
||||
#endif /* RCHECK */
|
||||
}
|
||||
#ifdef MEMSCRAMBLE
|
||||
{
|
||||
register int n;
|
||||
|
||||
#ifdef RCHECK
|
||||
n = p->mh_nbytes;
|
||||
#else /* not RCHECK */
|
||||
n = p->mh_size;
|
||||
#endif /* not RCHECK */
|
||||
zmemset (mem, 0xcf, n);
|
||||
}
|
||||
#endif
|
||||
{
|
||||
register int nunits = p -> mh_index;
|
||||
|
||||
ASSERT (nunits <= 29);
|
||||
p -> mh_alloc = ISFREE;
|
||||
|
||||
/* Protect against signal handlers calling malloc. */
|
||||
busy[nunits] = 1;
|
||||
/* Put this block on the free list. */
|
||||
CHAIN (p) = nextf[nunits];
|
||||
nextf[nunits] = p;
|
||||
busy[nunits] = 0;
|
||||
|
||||
#ifdef MSTATS
|
||||
nmalloc[nunits]--;
|
||||
nfre++;
|
||||
#endif /* MSTATS */
|
||||
}
|
||||
}
|
||||
|
||||
char *
|
||||
realloc (mem, n)
|
||||
char *mem;
|
||||
register unsigned int n;
|
||||
{
|
||||
register struct mhead *p;
|
||||
register unsigned int tocopy;
|
||||
register unsigned int nbytes;
|
||||
register int nunits;
|
||||
|
||||
if ((p = (struct mhead *) mem) == 0)
|
||||
return malloc (n);
|
||||
p--;
|
||||
nunits = p -> mh_index;
|
||||
ASSERT (p -> mh_alloc == ISALLOC);
|
||||
#ifdef RCHECK
|
||||
ASSERT (p -> mh_magic4 == MAGIC4);
|
||||
{
|
||||
register char *m = mem + (tocopy = p -> mh_nbytes);
|
||||
ASSERT (*m++ == MAGIC1); ASSERT (*m++ == MAGIC1);
|
||||
ASSERT (*m++ == MAGIC1); ASSERT (*m == MAGIC1);
|
||||
}
|
||||
#else /* not RCHECK */
|
||||
if (p -> mh_index >= 13)
|
||||
tocopy = (1 << (p -> mh_index + 3)) - sizeof *p;
|
||||
else
|
||||
tocopy = p -> mh_size;
|
||||
#endif /* not RCHECK */
|
||||
|
||||
/* See if desired size rounds to same power of 2 as actual size. */
|
||||
nbytes = (n + sizeof *p + EXTRA + 7) & ~7;
|
||||
|
||||
/* If ok, use the same block, just marking its size as changed. */
|
||||
if (nbytes > (4 << nunits) && nbytes <= (8 << nunits))
|
||||
{
|
||||
#ifdef RCHECK
|
||||
register char *m = mem + tocopy;
|
||||
*m++ = 0; *m++ = 0; *m++ = 0; *m++ = 0;
|
||||
p-> mh_nbytes = n;
|
||||
m = mem + n;
|
||||
*m++ = MAGIC1; *m++ = MAGIC1; *m++ = MAGIC1; *m++ = MAGIC1;
|
||||
#else /* not RCHECK */
|
||||
p -> mh_size = n;
|
||||
#endif /* not RCHECK */
|
||||
return mem;
|
||||
}
|
||||
|
||||
if (n < tocopy)
|
||||
tocopy = n;
|
||||
{
|
||||
register char *new;
|
||||
|
||||
if ((new = malloc (n)) == 0)
|
||||
return 0;
|
||||
FASTCOPY (mem, new, tocopy);
|
||||
free (mem);
|
||||
return new;
|
||||
}
|
||||
}
|
||||
|
||||
char *
|
||||
memalign (alignment, size)
|
||||
unsigned int alignment, size;
|
||||
{
|
||||
register char *ptr;
|
||||
register char *aligned;
|
||||
register struct mhead *p;
|
||||
|
||||
ptr = malloc (size + alignment);
|
||||
|
||||
if (ptr == 0)
|
||||
return 0;
|
||||
/* If entire block has the desired alignment, just accept it. */
|
||||
if (((int) ptr & (alignment - 1)) == 0)
|
||||
return ptr;
|
||||
/* Otherwise, get address of byte in the block that has that alignment. */
|
||||
aligned = (char *) (((int) ptr + alignment - 1) & -alignment);
|
||||
|
||||
/* Store a suitable indication of how to free the block,
|
||||
so that free can find the true beginning of it. */
|
||||
p = (struct mhead *) aligned - 1;
|
||||
p -> mh_size = aligned - ptr;
|
||||
p -> mh_alloc = ISMEMALIGN;
|
||||
return aligned;
|
||||
}
|
||||
|
||||
#if !defined (HPUX)
|
||||
/* This runs into trouble with getpagesize on HPUX, and Multimax machines.
|
||||
Patching out seems cleaner than the ugly fix needed. */
|
||||
#if defined (__STDC__)
|
||||
void *
|
||||
#else
|
||||
char *
|
||||
#endif
|
||||
valloc (size)
|
||||
size_t size;
|
||||
{
|
||||
return memalign (getpagesize (), size);
|
||||
}
|
||||
#endif /* !HPUX */
|
||||
|
||||
#ifndef NO_CALLOC
|
||||
char *
|
||||
calloc (n, s)
|
||||
size_t n, s;
|
||||
{
|
||||
size_t total;
|
||||
char *result;
|
||||
|
||||
total = n * s;
|
||||
result = malloc (total);
|
||||
if (result)
|
||||
zmemset (result, 0, total);
|
||||
return result;
|
||||
}
|
||||
|
||||
void
|
||||
cfree (p)
|
||||
char *p;
|
||||
{
|
||||
free (p);
|
||||
}
|
||||
#endif /* !NO_CALLOC */
|
||||
|
||||
#ifdef MSTATS
|
||||
/* Return statistics describing allocation of blocks of size 2**n. */
|
||||
|
||||
struct mstats_value
|
||||
{
|
||||
int blocksize;
|
||||
int nfree;
|
||||
int nused;
|
||||
};
|
||||
|
||||
struct mstats_value
|
||||
malloc_stats (size)
|
||||
int size;
|
||||
{
|
||||
struct mstats_value v;
|
||||
register int i;
|
||||
register struct mhead *p;
|
||||
|
||||
v.nfree = 0;
|
||||
|
||||
if (size < 0 || size >= 30)
|
||||
{
|
||||
v.blocksize = 0;
|
||||
v.nused = 0;
|
||||
return v;
|
||||
}
|
||||
|
||||
v.blocksize = 1 << (size + 3);
|
||||
v.nused = nmalloc[size];
|
||||
|
||||
for (p = nextf[size]; p; p = CHAIN (p))
|
||||
v.nfree++;
|
||||
|
||||
return v;
|
||||
}
|
||||
#endif /* MSTATS */
|
||||
|
||||
/*
|
||||
* This function returns the total number of bytes that the process
|
||||
* will be allowed to allocate via the sbrk(2) system call. On
|
||||
* BSD systems this is the total space allocatable to stack and
|
||||
* data. On USG systems this is the data space only.
|
||||
*/
|
||||
|
||||
#if !defined (HAVE_RESOURCE)
|
||||
extern long ulimit ();
|
||||
|
||||
static void
|
||||
get_lim_data ()
|
||||
{
|
||||
lim_data = ulimit (3, 0);
|
||||
lim_data -= (long) data_space_start;
|
||||
}
|
||||
|
||||
#else /* HAVE_RESOURCE */
|
||||
static void
|
||||
get_lim_data ()
|
||||
{
|
||||
struct rlimit XXrlimit;
|
||||
|
||||
getrlimit (RLIMIT_DATA, &XXrlimit);
|
||||
#ifdef RLIM_INFINITY
|
||||
lim_data = XXrlimit.rlim_cur & RLIM_INFINITY; /* soft limit */
|
||||
#else
|
||||
lim_data = XXrlimit.rlim_cur; /* soft limit */
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* HAVE_RESOURCE */
|
||||
@@ -1,151 +0,0 @@
|
||||
/*
|
||||
* malloc test program.
|
||||
*
|
||||
* to build:
|
||||
* make x.o
|
||||
* gcc -g -o x x.o xmalloc.o lib/malloc/libmalloc.a
|
||||
*/
|
||||
|
||||
/* Copyright (C) 2002-2003 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
Bash is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Bash is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Bash. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define USING_BASH_MALLOC
|
||||
#define HAVE_STRINGIZE
|
||||
|
||||
#include "xmalloc.h"
|
||||
|
||||
int interrupt_immediately = 0;
|
||||
|
||||
static char xp[64];
|
||||
|
||||
main(int c, char **v)
|
||||
{
|
||||
char *p;
|
||||
|
||||
malloc_set_register(1);
|
||||
|
||||
#if 0
|
||||
free (xp); /* free unallocated memory */
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
p = xrealloc(xp, 128);
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
/*
|
||||
* request an amount so that the bucket changes when the malloc
|
||||
* overhead is added to the requested size. This had better
|
||||
* succeed.
|
||||
*/
|
||||
p = xmalloc(25);
|
||||
p[0] = 'a';
|
||||
p[1] = '\0';
|
||||
free(p); /* sanity check on underflow checks in free() */
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
p = xmalloc(28);
|
||||
/* This works for little-endian machines like i386. */
|
||||
p[-4] = '\7'; /* underflow */
|
||||
p = xrealloc(p, 128); /* realloc corrupted memory */
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
p = xmalloc(28);
|
||||
/* This works for little-endian machines like i386. */
|
||||
p[-4] = '\7'; /* underflow */
|
||||
free(p);
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
p = xmalloc(2);
|
||||
free(p);
|
||||
free(p); /* duplicate free */
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
p = xmalloc(32);
|
||||
free(p);
|
||||
p = xrealloc(p, 128); /* realloc freed mem */
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
p = xmalloc(64);
|
||||
p[64] = '\0';
|
||||
p = xrealloc(p, 128); /* overflow */
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
p = xmalloc(64);
|
||||
p[64] = '\0';
|
||||
free(p); /* overflow */
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
p = xmalloc(64);
|
||||
p[-1] = 'a';
|
||||
free (p); /* underflow */
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
p = xmalloc(64);
|
||||
p[-1] = 'a';
|
||||
p = xrealloc(p, 129); /* underflow */
|
||||
#endif
|
||||
|
||||
mregister_dump_table();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
void
|
||||
fatal_error(const char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
fprintf(stderr, "malloc-test: ");
|
||||
va_start(args, format);
|
||||
vfprintf(stderr, format, args);
|
||||
fprintf(stderr, "\n");
|
||||
va_end(args);
|
||||
exit(2);
|
||||
}
|
||||
|
||||
void
|
||||
programming_error(const char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
fprintf(stderr, "malloc-test: ");
|
||||
va_start(args, format);
|
||||
vfprintf(stderr, format, args);
|
||||
fprintf(stderr, "\n");
|
||||
va_end(args);
|
||||
|
||||
abort();
|
||||
}
|
||||
|
||||
int
|
||||
signal_is_trapped(int n)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
-310
@@ -1,310 +0,0 @@
|
||||
total 3772
|
||||
drwxr-xr-x 100 root root 12288 Apr 21 04:13 ./
|
||||
drwxr-xr-x 29 root root 4096 Apr 21 03:02 ../
|
||||
-rw-r--r-- 1 root root 15288 Jan 15 2008 a2ps.cfg
|
||||
-rw-r--r-- 1 root root 2562 Jan 15 2008 a2ps-site.cfg
|
||||
drwxr-xr-x 4 root root 4096 Oct 5 2011 acpi/
|
||||
-rw-r--r-- 1 root root 46 Apr 21 03:00 adjtime
|
||||
drwxr-xr-x 4 root root 4096 May 17 2010 alchemist/
|
||||
-rw-r--r-- 1 root root 1601 May 25 2010 aliases
|
||||
-rw-r--r-- 1 root root 12288 Apr 21 03:03 aliases.db
|
||||
-rw-r--r-- 1 root root 1512 Apr 25 2005 aliases.redhat
|
||||
drwxr-xr-x 4 root root 4096 May 17 2010 alsa/
|
||||
drwxr-xr-x 2 root root 4096 Apr 21 01:01 alternatives/
|
||||
-rw-r--r-- 1 root root 298 Dec 18 2006 anacrontab
|
||||
-rw------- 1 root root 1 Oct 3 2014 at.deny
|
||||
drwxr-x--- 3 root root 4096 May 31 2012 audisp/
|
||||
drwxr-x--- 2 root root 4096 May 31 2012 audit/
|
||||
-rw------- 1 root root 3902 Jul 11 2014 autofs_ldap_auth.conf
|
||||
-rw-r--r-- 1 root root 681 May 25 2010 auto.master
|
||||
-rw-r--r-- 1 root root 717 Mar 16 2010 auto.master.redhat
|
||||
-rw-r--r-- 1 root root 581 Jul 11 2014 auto.misc
|
||||
-rwxr-xr-x 1 root root 1292 Jul 11 2014 auto.net*
|
||||
-rwxr-xr-x 1 root root 742 Jul 11 2014 auto.smb*
|
||||
drwxr-xr-x 4 root root 4096 May 31 2011 avahi/
|
||||
lrwxrwxrwx 1 root root 21 Feb 10 2014 avamar -> /usr/local/avamar/etc/
|
||||
-rw-r--r-- 1 root root 1872 Dec 5 2011 bashrc
|
||||
drwxr-xr-x 2 root root 4096 Apr 21 03:03 blkid/
|
||||
drwxr-xr-x 2 root root 4096 May 31 2011 bonobo-activation/
|
||||
-rw-r--r-- 1 root root 977 Oct 3 2008 cdrecord.conf
|
||||
-rw-r--r-- 1 root root 306 May 25 2010 CHANGELOG.txt
|
||||
drwx------ 2 root root 4096 Oct 14 2014 cron.d/
|
||||
drwxr-xr-x 2 root root 4096 Feb 17 01:02 cron.daily/
|
||||
-rw-r--r-- 1 root root 0 May 17 2010 cron.deny
|
||||
drwxr-xr-x 2 root root 4096 Aug 29 2012 cron.hourly/
|
||||
drwxr-xr-x 2 root root 4096 Aug 29 2012 cron.monthly/
|
||||
-rw-r--r-- 1 root root 255 Aug 29 2012 crontab
|
||||
drwxr-xr-x 2 root root 4096 Feb 27 2013 cron.weekly/
|
||||
-rw-r--r-- 1 root root 1044 Dec 5 2011 csh.cshrc
|
||||
-rw-r--r-- 1 root root 823 Dec 5 2011 csh.login
|
||||
drwxr-xr-x 5 root lp 4096 Feb 17 01:02 cups/
|
||||
drwxr-xr-x 4 root root 4096 Oct 22 2013 dbus-1/
|
||||
drwxr-xr-x 2 root root 4096 Jan 28 15:45 default/
|
||||
drwxr-xr-x 2 root root 4096 Oct 22 2013 depmod.d/
|
||||
drwxr-xr-x 3 root root 4096 Jun 6 2014 dev.d/
|
||||
-rw-r--r-- 1 root root 2892 Jan 7 22:12 dhcpd.conf
|
||||
-rw-r--r-- 1 root root 2751 Feb 7 2013 dhcpd.conf~
|
||||
-rw-r--r-- 1 root root 2822 Oct 15 2014 dhcpd.conf.ACT
|
||||
-rw-r--r-- 1 root root 2822 Oct 15 2014 dhcpd.conf.ACT.old
|
||||
-rw-r--r-- 1 root root 86 Jul 29 2005 dhcpd.conf.example.RH
|
||||
-rw-r--r-- 1 root root 2822 Jan 7 22:12 dhcpd.conf.last
|
||||
-rw-r--r-- 1 root root 2821 Mar 20 2013 dhcpd.conf.lurch
|
||||
-rw-r--r-- 1 root root 1918 Aug 19 2010 dhcpd.conf.test
|
||||
-rw-r--r-- 1 root root 2892 Dec 18 16:42 dhcpd.conf.tftp-changes
|
||||
-rw-r--r-- 1 root root 2822 Dec 18 16:01 dhcpd.conf.tftp-changes~
|
||||
lrwxrwxrwx 1 root root 12 Feb 7 2013 dhcplog -> /fs1/dhcplog
|
||||
-rw-r--r-- 1 root root 2518 Mar 14 2012 DIR_COLORS
|
||||
-rw-r--r-- 1 root root 2420 Mar 14 2012 DIR_COLORS.xterm
|
||||
-rw-r--r-- 1 root root 18484 Aug 25 2009 dnsmasq.conf
|
||||
drwxr-xr-x 2 root root 4096 Aug 25 2009 dnsmasq.d/
|
||||
-rw-rw-r-- 1 root disk 0 Sep 16 2011 dumpdates
|
||||
-rw-r--r-- 1 root root 4843 Nov 27 2008 enscript.cfg
|
||||
-rw-r--r-- 1 root root 0 Dec 5 2011 environment
|
||||
-rw-r--r-- 1 root root 153 Dec 21 2011 esd.conf
|
||||
-rw-r--r-- 1 root root 0 Jan 12 2000 exports
|
||||
-rw-r--r-- 1 root root 22060 Jul 13 2006 fb.modes
|
||||
-rw-r--r-- 1 root root 59 Jan 31 2006 filesystems
|
||||
drwxr-xr-x 2 root root 4096 May 31 2012 firmware/
|
||||
drwxr-xr-x 4 root root 4096 May 17 2010 fonts/
|
||||
drwxr-xr-x 2 root root 4096 Sep 2 2011 foomatic/
|
||||
-rw-r--r-- 1 root root 843 Mar 18 2014 fstab
|
||||
-rw-r--r-- 1 root root 532 Nov 20 2010 fstab.20101120
|
||||
-rw-r--r-- 1 root root 843 Oct 17 2013 fstab.20131017
|
||||
-rw-r--r-- 1 root root 843 Nov 6 2013 fstab.20131106
|
||||
-rw-r--r-- 1 root root 843 Mar 17 2014 fstab.20140317
|
||||
-rw-r--r-- 1 root root 532 Dec 17 2011 fstab.last
|
||||
-rw-r--r-- 1 root root 532 Dec 21 2011 fstab.orig
|
||||
drwxr-xr-x 6 root root 4096 May 17 2010 gconf/
|
||||
drwxr-xr-x 2 root root 4096 Oct 10 2013 gcrypt/
|
||||
drwxr-xr-x 7 root root 4096 Sep 17 2013 gdm/
|
||||
drwxr-xr-x 2 root root 4096 Sep 10 2013 ghostscript/
|
||||
drwxr-xr-x 3 root root 4096 Jul 1 2013 gnome-vfs-2.0/
|
||||
-rw-r--r-- 1 root root 10793 Jul 12 2006 gnome-vfs-mime-magic
|
||||
-rw-r--r-- 1 root root 1756 Jul 12 2006 gpm-root.conf
|
||||
-rw-r--r-- 1 root root 909 Oct 14 2014 group
|
||||
-rw------- 1 root root 909 Oct 22 2013 group-
|
||||
-rw-r--r-- 1 root root 751 May 17 2010 group.redhat
|
||||
lrwxrwxrwx 1 root root 22 May 17 2010 grub.conf -> ../boot/grub/grub.conf
|
||||
-r-------- 1 root root 765 Oct 14 2014 gshadow
|
||||
-rw------- 1 root root 765 Oct 22 2013 gshadow-
|
||||
-rw-r--r-- 1 root root 833 Jan 16 2007 gssapi_mech.conf
|
||||
drwxr-xr-x 2 root root 4096 Feb 27 2013 gtk/
|
||||
drwxr-xr-x 4 root root 4096 Jul 26 2013 gtk-2.0/
|
||||
drwxr-xr-x 3 root root 4096 Aug 13 2012 hal/
|
||||
-rw-r--r-- 1 root root 0 Dec 5 2011 host.conf
|
||||
-rw-r--r-- 1 root root 275 Dec 21 2011 hosts
|
||||
-rw-r--r-- 1 root root 226 Jun 28 2010 hosts~
|
||||
-rw-r--r-- 1 root root 1721 May 15 2014 hosts.allow
|
||||
-rw-r--r-- 1 root root 1676 Jan 28 2014 hosts.allow~
|
||||
-rw-r--r-- 1 root root 2105 May 25 2010 hosts.allow.bundaberg
|
||||
-rw-r--r-- 1 root root 1551 Jun 28 2010 hosts.allow.don
|
||||
-rw-r--r-- 1 root root 252 May 25 2010 hosts.allow.orig
|
||||
-rw-r--r-- 1 root root 161 Jan 12 2000 hosts.allow.redhat
|
||||
-rw-r--r-- 1 root root 8 May 25 2010 hosts.deny
|
||||
-rw-r--r-- 1 root root 347 Jan 12 2000 hosts.deny.redhat
|
||||
-rw-r--r-- 1 root root 165 Dec 5 2011 hosts.deny.rpmnew
|
||||
-rw-r--r-- 1 root root 226 Jun 24 2010 hosts.new.lurch
|
||||
-rw-r--r-- 1 root root 229 Jun 24 2010 hosts.orig
|
||||
drwxr-xr-x 2 root root 4096 May 31 2011 hp/
|
||||
drwxr-xr-x 4 root root 4096 Oct 14 2014 httpd/
|
||||
-rw-r--r-- 1 root root 3579 Feb 10 2014 idmapd.conf
|
||||
lrwxrwxrwx 1 root root 11 May 17 2010 init.d -> rc.d/init.d/
|
||||
-rw-r--r-- 1 root root 658 Mar 19 2014 initlog.conf
|
||||
-rw-r--r-- 1 root root 1666 Mar 19 2014 inittab
|
||||
-rw-r--r-- 1 root root 758 Sep 23 2004 inputrc
|
||||
drwxr-xr-x 2 root root 4096 Feb 27 2013 iproute2/
|
||||
drwxr-xr-x 2 root root 4096 Feb 27 2013 iscsi/
|
||||
-rw-r--r-- 1 root root 75 Aug 12 2014 issue
|
||||
-rw-r--r-- 1 root root 74 Aug 12 2014 issue.net
|
||||
drwxr-xr-x 3 root root 4096 Feb 27 2013 java/
|
||||
drwxr-xr-x 2 root root 4096 Oct 12 2012 jvm/
|
||||
drwxr-xr-x 2 root root 4096 Oct 12 2012 jvm-commmon/
|
||||
-rw-r--r-- 1 root root 32016 Mar 29 2011 jwhois.conf
|
||||
-rw-r--r-- 1 root root 1265 Oct 14 2014 kdump.conf
|
||||
-rw-r--r-- 1 root root 608 Sep 3 2014 krb5.conf
|
||||
-rw-r--r-- 1 root root 9014 May 25 2010 ldap.conf
|
||||
-rw-r--r-- 1 root root 9111 May 17 2010 ldap.conf.redhat
|
||||
-rw------- 1 root root 9 May 25 2010 ldap.secret
|
||||
-rw-r--r-- 1 root root 89567 Apr 21 01:02 ld.so.cache
|
||||
-rw-r--r-- 1 root root 28 Oct 8 2006 ld.so.conf
|
||||
drwxr-xr-x 2 root root 4096 Jan 19 12:15 ld.so.conf.d/
|
||||
-rw-r--r-- 1 root root 3544 Jul 16 2012 lftp.conf
|
||||
-rw-r----- 1 root root 191 Oct 27 2011 libaudit.conf
|
||||
drwxr-xr-x 2 root root 4096 May 25 2010 libsmbios/
|
||||
-rw-r--r-- 1 root root 2506 May 10 2012 libuser.conf
|
||||
drwx------ 3 root root 4096 May 25 2010 libvirt/
|
||||
-rw-r--r-- 1 root root 25 May 25 2010 local_ip
|
||||
-rw-r--r-- 1 root root 3519 Feb 26 2006 localtime
|
||||
-rw-r--r-- 1 root root 416 May 25 2010 localusers
|
||||
-rw-r--r-- 1 root root 1522 May 17 2010 login.defs
|
||||
-rw-r--r-- 1 root root 1435 Feb 24 2012 logrotate.conf
|
||||
-rw-r--r-- 1 root root 1372 Jul 26 2010 logrotate.conf~
|
||||
-rw-r--r-- 1 root root 520 Sep 2 2008 logrotate.conf.redhat
|
||||
-rw-r--r-- 1 root root 619 Mar 30 2011 logrotate.conf.rpmnew
|
||||
-rw-r--r-- 1 root root 1371 Jun 16 2010 logrotate.conf.save
|
||||
drwxr-xr-x 2 root root 4096 Apr 21 01:01 logrotate.d/
|
||||
drwxr-xr-x 4 root root 4096 Jul 11 2012 logwatch/
|
||||
drwxr-xr-x 2 root root 4096 May 31 2011 lsb-release.d/
|
||||
-rw-r--r-- 1 root root 10814 Feb 20 2006 ltrace.conf
|
||||
drwxr-xr-x 5 root root 4096 Oct 14 2014 lvm/
|
||||
-rw-r--r-- 1 root root 140191 Oct 27 2008 lynx.cfg
|
||||
-rw-r--r-- 1 root root 66 Oct 27 2008 lynx-site.cfg
|
||||
-rw-r--r-- 1 root root 293 Sep 5 2006 mailcap
|
||||
-rw-r--r-- 1 root root 112 Jul 13 2006 mail.rc
|
||||
drwxr-xr-x 2 root root 4096 May 17 2010 makedev.d/
|
||||
-rw-r--r-- 1 root root 4617 Apr 17 2012 man.config
|
||||
drwxr-xr-x 2 root root 4096 Feb 27 2013 maven/
|
||||
-rwxr-xr-x 1 root root 2242 May 13 2011 mcelog.conf*
|
||||
-rw-r--r-- 1 root root 14100 Sep 5 2006 mime.types
|
||||
-rw-r--r-- 1 root root 330 Apr 14 2014 mke2fs.conf
|
||||
-rw-r--r-- 1 root root 172 May 23 2014 modprobe.conf
|
||||
-rw-r--r-- 1 root root 156 May 23 2014 modprobe.conf~
|
||||
drwxr-xr-x 2 root root 4096 Apr 21 01:01 modprobe.d/
|
||||
-rw-r--r-- 1 root root 0 Jan 12 2000 motd
|
||||
-rw-r--r-- 1 root root 533 May 25 2010 motd-security
|
||||
-rw-r--r-- 1 root root 602 Apr 21 03:03 mtab
|
||||
-rw-r--r-- 1 root root 1983 Aug 9 2006 mtools.conf
|
||||
-rw-r--r-- 1 root root 2706 May 1 2014 multipath.conf
|
||||
-rw-r--r-- 1 root root 92794 Jul 4 2012 Muttrc
|
||||
-rw-r--r-- 1 root root 0 Jul 4 2012 Muttrc.local
|
||||
-rw-r--r-- 1 root root 441 Jan 8 2013 my.cnf
|
||||
drwxr-xr-x 2 root root 4096 Nov 12 2013 netplug/
|
||||
drwxr-xr-x 2 root root 4096 Nov 12 2013 netplug.d/
|
||||
drwxr-xr-x 4 root root 4096 Aug 8 2011 NetworkManager/
|
||||
-rw-r--r-- 1 root root 1895 Jan 19 12:13 nscd.conf
|
||||
-rw-r--r-- 1 root root 1730 Apr 21 01:00 nsswitch.conf
|
||||
-rw-r--r-- 1 root root 1709 Aug 8 2011 nsswitch.conf.cwru.ldap
|
||||
-rw-r--r-- 1 root root 1730 Apr 21 01:00 nsswitch.conf.cwru.pre-patching
|
||||
-rw-r--r-- 1 root root 1696 Sep 22 2004 nsswitch.conf.redhat
|
||||
drwxr-xr-x 2 root root 4096 Feb 17 01:02 ntp/
|
||||
-rw-r--r-- 1 root root 246 Aug 20 2014 ntp.conf
|
||||
-rw-r--r-- 1 root root 190 Apr 14 2014 ntp.conf~
|
||||
-rw-r--r-- 1 root root 190 Apr 14 2014 ntp.conf.backup.2014
|
||||
-rw-r--r-- 1 root root 1833 Nov 26 2009 ntp.conf.redhat
|
||||
-rw-r--r-- 1 root root 0 Oct 18 2011 odbc.ini
|
||||
-rw-r--r-- 1 root root 1366 Oct 18 2011 odbcinst.ini
|
||||
-rw-r--r-- 1 root root 1366 Oct 18 2011 odbcinst.ini.rpmnew
|
||||
lrwxrwxrwx 1 root root 32 May 25 2010 omreg.cfg -> /opt/dell/srvadmin/etc/omreg.cfg
|
||||
drwxr-xr-x 3 root root 4096 May 12 2014 openldap/
|
||||
drwxr-xr-x 2 root root 4096 May 25 2010 openwsman/
|
||||
drwxr-xr-x 2 root root 4096 Oct 1 2009 opt/
|
||||
drwxr-xr-x 2 root root 4096 Feb 17 01:02 pam.d/
|
||||
drwxr-xr-x 2 root root 4096 May 31 2012 pam_pkcs11/
|
||||
-rw-r--r-- 1 root root 12 Jul 12 2006 pam_smb.conf
|
||||
drwxr-xr-x 4 root root 4096 Nov 8 2011 pango/
|
||||
-rw-r--r-- 1 root root 2538 Oct 14 2014 passwd
|
||||
-rw-r--r-- 1 root root 2536 Oct 22 2013 passwd~
|
||||
-rw-r--r-- 1 root root 2538 Apr 2 2014 passwd-
|
||||
-rw-r--r-- 1 root root 2591 Jan 17 2014 passwd.20140402130113
|
||||
-rw-r--r-- 1 root root 2487 Jun 9 2010 passwd.catbert
|
||||
-rw-r--r-- 1 root root 2487 Jun 9 2010 passwd.OLD
|
||||
-rw-r--r-- 1 root root 1871 Jun 9 2010 passwd.orig
|
||||
-rw-r--r-- 1 root root 1815 May 17 2010 passwd.redhat
|
||||
drwxr-xr-x 2 root root 4096 May 17 2010 pcmcia/
|
||||
drwxr-xr-x 2 root root 4096 Nov 25 01:01 php.d/
|
||||
-rw-r--r-- 1 root root 45081 Oct 28 09:21 php.ini
|
||||
-rw-r--r-- 1 root root 2875 Sep 12 2006 pinforc
|
||||
drwxr-xr-x 6 root root 4096 May 17 2010 pki/
|
||||
drwxr-xr-x 5 root root 4096 Feb 27 2013 pm/
|
||||
drwxr-xr-x 2 root root 4096 Oct 14 2014 postfix/
|
||||
drwxr-xr-x 3 root root 4096 Oct 14 2014 ppp/
|
||||
-rw-r--r-- 1 root root 262772 Apr 21 04:13 prelink.cache
|
||||
-rw-r--r-- 1 root root 973 Sep 18 2008 prelink.conf
|
||||
drwxr-xr-x 2 root root 4096 Sep 18 2008 prelink.conf.d/
|
||||
-rw-r--r-- 1 root root 309 Apr 21 03:03 printcap
|
||||
-rw-r--r-- 1 root root 135 May 17 2010 printcap.redhat
|
||||
-rw-r--r-- 1 root root 1344 Dec 5 2011 profile
|
||||
drwxr-xr-x 2 root root 4096 Oct 14 2014 profile.d/
|
||||
-rw-r--r-- 1 root root 6108 Oct 11 2006 protocols
|
||||
-rw------- 1 root root 2487 Jun 16 2010 ptmp~
|
||||
-rw------- 1 root root 0 May 17 2010 .pwd.lock
|
||||
-rw-r--r-- 1 root root 220 Jul 31 2012 quotagrpadmins
|
||||
-rw-r--r-- 1 root root 290 Jul 31 2012 quotatab
|
||||
drwxr-xr-x 3 root root 4096 Feb 27 2013 racoon/
|
||||
lrwxrwxrwx 1 root root 7 Oct 14 2014 rc -> rc.d/rc*
|
||||
lrwxrwxrwx 1 root root 10 Oct 14 2014 rc0.d -> rc.d/rc0.d/
|
||||
lrwxrwxrwx 1 root root 10 Oct 14 2014 rc1.d -> rc.d/rc1.d/
|
||||
lrwxrwxrwx 1 root root 10 Oct 14 2014 rc2.d -> rc.d/rc2.d/
|
||||
lrwxrwxrwx 1 root root 10 Oct 14 2014 rc3.d -> rc.d/rc3.d/
|
||||
lrwxrwxrwx 1 root root 10 Oct 14 2014 rc4.d -> rc.d/rc4.d/
|
||||
lrwxrwxrwx 1 root root 10 Oct 14 2014 rc5.d -> rc.d/rc5.d/
|
||||
lrwxrwxrwx 1 root root 10 Oct 14 2014 rc6.d -> rc.d/rc6.d/
|
||||
drwxr-xr-x 10 root root 4096 Oct 14 2014 rc.d/
|
||||
lrwxrwxrwx 1 root root 13 Oct 14 2014 rc.local -> rc.d/rc.local*
|
||||
lrwxrwxrwx 1 root root 15 Oct 14 2014 rc.sysinit -> rc.d/rc.sysinit*
|
||||
drwxr-xr-x 2 root root 4096 May 17 2010 readahead.d/
|
||||
drwxr-xr-x 2 root root 4096 May 31 2011 redhat-lsb/
|
||||
-rw-r--r-- 1 root root 55 Aug 12 2014 redhat-release
|
||||
-rw-r--r-- 1 root root 135 May 23 2014 resolv.conf
|
||||
-rw-r--r-- 1 root root 67 May 17 2010 resolv.conf.redhat
|
||||
drwxr-xr-x 3 root root 4096 May 17 2010 rhgb/
|
||||
lrwxrwxrwx 1 root root 11 May 31 2012 rmt -> ../sbin/rmt*
|
||||
-rw-r--r-- 1 root root 1621 Feb 12 2014 rpc
|
||||
drwxr-xr-x 2 root root 4096 Nov 18 11:30 rpm/
|
||||
-rw-r--r-- 1 root root 754 Mar 19 2014 rwtab
|
||||
drwxr-xr-x 2 root root 4096 Mar 19 2014 rwtab.d/
|
||||
drwxr-xr-x 2 root root 4096 Apr 15 2014 samba/
|
||||
drwxr-xr-x 2 root root 4096 Aug 21 2012 sasl2/
|
||||
-rw-r--r-- 1 root root 6972 Feb 1 2011 screenrc
|
||||
-rw-r--r-- 1 root root 103 Nov 7 2006 scrollkeeper.conf
|
||||
-rw-r--r-- 1 root root 666 Jun 6 2014 scsi_id.config
|
||||
-rw------- 1 root root 122 Feb 17 2003 securetty
|
||||
drwxr-xr-x 5 root root 4096 Apr 15 2014 security/
|
||||
drwxr-xr-x 3 root root 4096 Jul 8 2014 selinux/
|
||||
-rw-r--r-- 1 root root 85179 Jan 26 2010 sensors.conf
|
||||
-rw-r--r-- 1 root root 362031 Feb 23 2006 services
|
||||
-rw-r--r-- 1 root root 216 May 23 2013 sestatus.conf
|
||||
drwxr-xr-x 2 root root 4096 Apr 21 01:01 setroubleshoot/
|
||||
drwxr-xr-x 2 root root 4096 May 17 2010 setuptool.d/
|
||||
drwxr-xr-x 2 root root 4096 Oct 14 2014 sfcb/
|
||||
drwxr-xr-x 2 root root 4096 May 17 2010 sgml/
|
||||
-r-------- 1 root root 1473 Apr 2 2014 shadow
|
||||
-r-------- 1 root root 1472 Jun 16 2010 shadow~
|
||||
-r-------- 1 root root 1097 May 17 2010 shadow-
|
||||
-r-------- 1 root root 1505 Jan 17 2014 shadow.20140402130113
|
||||
-r-------- 1 root root 1472 Jun 9 2010 shadow.catbert
|
||||
-r-------- 1 root root 1472 Jun 9 2010 shadow.OLD
|
||||
-r-------- 1 root root 1097 Jun 9 2010 shadow.orig
|
||||
-rw-r--r-- 1 root root 60 May 17 2010 shells
|
||||
drwxr-xr-x 3 root root 4096 Sep 26 2014 skel/
|
||||
-rw-r--r-- 1 root root 21851 Jul 12 2006 slrn.rc
|
||||
-rw-r--r-- 1 root root 6717 Aug 23 2012 smartd.conf
|
||||
-rw-r--r-- 1 root root 1272 Jan 4 2008 smi.conf
|
||||
drwxr-xr-x 2 root root 4096 Sep 25 2014 snmp/
|
||||
drwxr-xr-x 3 root root 4096 Oct 18 2006 sound/
|
||||
-rw------- 1 root root 1472 Jun 16 2010 sptmp~
|
||||
drwxr-xr-x 2 root root 4096 Sep 16 2014 squid/
|
||||
drwxr-xr-x 4 root root 4096 May 31 2012 ssh/
|
||||
drwxr-xr-x 2 root root 4096 Oct 23 10:23 stunnel/
|
||||
drwxr-xr-x 2 root root 4096 Feb 12 2014 subversion/
|
||||
-r--r----- 1 root root 3553 Jan 28 2014 sudoers
|
||||
-r--r----- 1 root root 800 May 25 2010 sudoers.bundaberg
|
||||
-r--r----- 1 root root 3193 Apr 13 2010 sudoers.redhat
|
||||
-r--r----- 1 root root 3381 Sep 15 2010 sudoers.rpmnew
|
||||
-rw------- 1 root root 3500 Jun 16 2010 #sudoers.tmp#
|
||||
-rw------- 1 root root 3491 Mar 7 2011 sudoers.tmp~
|
||||
drwxr-xr-x 10 root root 4096 Apr 21 01:01 sysconfig/
|
||||
-rw-r--r-- 1 root root 996 Mar 19 2014 sysctl.conf
|
||||
-rw-r--r-- 1 root root 1413 Feb 12 2014 syslog.conf
|
||||
-rw-r--r-- 1 root root 1661 Aug 24 2012 syslog.conf~
|
||||
-rw-r--r-- 1 root root 694 Jan 5 2010 syslog.conf.redhat
|
||||
-rw-r--r-- 1 root root 807103 Jul 12 2006 termcap
|
||||
drwxr-xr-x 5 root root 4096 Oct 14 2014 udev/
|
||||
-rw-r--r-- 1 root root 136 Mar 17 2009 updatedb.conf
|
||||
-rw-r--r-- 1 root root 1533 Jul 10 2012 vimrc
|
||||
-rw-r--r-- 1 root root 1533 Jul 10 2012 virc
|
||||
drwxr-xr-x 2 root root 4096 Feb 27 2013 vsftpd/
|
||||
-rw-r--r-- 1 root root 2678 Jul 31 2012 warnquota.conf
|
||||
-rw-r--r-- 1 root root 23735 Jul 12 2006 webalizer.conf
|
||||
-rw-r--r-- 1 root root 4204 Apr 23 2012 wgetrc
|
||||
drwxr-xr-x 2 root root 4096 Oct 22 2013 wpa_supplicant/
|
||||
drwxr-xr-x 9 root root 4096 Feb 17 01:01 X11/
|
||||
drwxr-xr-x 4 root root 4096 May 17 2010 xdg/
|
||||
-rw-r--r-- 1 root root 1001 Oct 1 2013 xinetd.conf
|
||||
drwxr-xr-x 2 root root 4096 Nov 25 01:01 xinetd.d/
|
||||
drwxr-xr-x 2 root root 4096 May 17 2010 xml/
|
||||
drwxr-xr-x 4 root root 4096 Sep 16 2014 yum/
|
||||
-rw-r--r-- 1 root root 708 Feb 7 2012 yum.conf
|
||||
-rw-r--r-- 1 root root 628 Dec 21 2011 yum.conf~
|
||||
-rw-r--r-- 1 root root 628 Dec 21 2011 yum.conf.bad
|
||||
drwxr-xr-x 2 root root 4096 Oct 14 2014 yum.repos.d/
|
||||
Reference in New Issue
Block a user