| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
points. For library functions, the pattern is __sleep() <--
_libc_sleep() <-- sleep(). The arrows represent weak aliases. For
system calls, the pattern is _read() <-- _libc_read() <-- read().
|
|
|
|
|
|
| |
doesn't handle nastier corner cases such as "-j3 -33" correctly. <shrug>
PR: docs/12994 (James Howard <howardjp@wam.umd.edu>)
|
|
|
|
|
| |
See imp's 199808201619.KAA20970@harmony.village.org in freebsd-hackers (the
reallocf.c cvs history mistakenly refers to freebsd-current).
|
| |
|
|
|
|
| |
Approved by: phk
|
|
|
|
|
|
| |
a diagnostis).
Submitted by: Guy Harris <gharris@flashcom.net>
|
|
|
|
|
| |
PR: docs/15337
Submitted by: Bruce A. Mah <bmah@ca.sandia.gov>
|
|
|
|
| |
Obtained from: OpenBSD
|
|
|
|
| |
does not zero the allocated memory.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- Sort xrefs
- FreeBSD.ORG -> FreeBSD.org
- Be consistent with section names as outlines in mdoc(7)
- Other misc mdoc cleanup.
PR: doc/13144
Submitted by: Alexy M. Zelkin <phantom@cris.net>
|
| |
|
|
|
|
| |
sysexits.h-values as exit codes for portable programs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
track.
The $Id$ line is normally at the bottom of the main comment block in the
man page, separated from the rest of the manpage by an empty comment,
like so;
.\" $Id$
.\"
If the immediately preceding comment is a @(#) format ID marker than the
the $Id$ will line up underneath it with no intervening blank lines.
Otherwise, an additional blank line is inserted.
Approved by: bde
|
| |
|
|
|
|
| |
Approved by: phk
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
changes have made this too expensive. This gains about 1.25% on
worldstone on my SMP machine.
Swap-less machines, for instance PicoBSDs, and machines which experience
page-out trafic, check with top(1), will probably want to reenable this
with:
ln -s H /etc/malloc.conf
Suggested by: alc (&dyson ?)
|
|
|
|
| |
PR: docs/9376
|
| |
|
|
|
|
|
|
|
| |
be expected.
PR: docs/9701
Submitted by: Marc van Kempen <marc@bowtie.nl>
|
| |
|
| |
|
|
|
|
|
| |
PR: 8566
Submitted by: Archie Cobbs <archie@whistle.com>
|
|
|
|
|
|
|
|
|
| |
realloc functions check for recursion within the malloc code itself. In
a thread-safe library, the single spinlock ensures that no two threads
go inside the protected code at the same time. The thread implementation
is responsible for ensuring that the spinlock does in fact protect malloc.
There was a window of opportunity in which this was not the case. I'll fix
that with a commit RSN.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Our spinlock implementation allows a particular thread to obtain a lock
multiple times, but release the lock with a single unlock call. Since
we're detecting recursion, we know the lock is already owned by the
current thread in a previous call and must not be released in the
current call. This is really far too dependent on this particular
spinlock implementation, so I've added commented out calls to
THREAD_UNLOCK in the appropriate places. We can activate this code when
spinlock is taught to count each lock operation.
|
|
|
|
|
|
| |
Set malloc_func *after* grabbing the thread lock.
Noticed by: Simon Coggins <simon@oz.org>
|
|
|
|
|
|
|
|
|
|
|
| |
In some cases replace if (a == null) a = malloc(x); else a =
realloc(a, x); with simple reallocf(a, x). Per ANSI-C, this is
guaranteed to be the same thing.
I've been running these on my system here w/o ill effects for some
time. However, the CTM-express is at part 6 of 34 for the CAM
changes, so I've not been able to do a build world with the CAM in the
tree with these changes. Shouldn't impact anything, but...
|
|
|
|
|
|
| |
o Properly order things
Pointed out by: bde
|
|
|
|
|
|
| |
o No copyright on reallocf.
o Order makefile list correctly.
o indent reallocf properly.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
when it returns NULL to indicate failure, it will also free the memory
that was passed to it, if that was non-null.
This does not change the semantics of realloc.
A second commit will be done to commit the conversion of those places in
the code that can safely use this to avoid memory leaks when confronted
with low memory situations.
Beaten-to-death-but-finally-approved-in: -current
|
|
|
|
| |
errno during a successful malloc() call.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
but also assumes that they are 32-bits. This is one place where I don't
think it is appropriate to change 'long' to 'int'. I don't see why the
code couldn't be fixed so that using natural long variables does the
right thing. It's spaggetti code so it'll take some effort. Obviously
NetBSD thought so too because they change 'long' to 'int32_t' etc
and left it at that. As a temporary measure FreeBSD/Alpha can use the
NetBSD code and put this on the list of things to fix.
|
| |
|
|
|
|
|
|
|
| |
and non-threaded programs. This makes malloc thread safe for linking
with libpthread and kernel threads.
Reviewed by: phk
|
|
|
|
| |
autoinitialiser gets linked in and therefore called before main().
|
| |
|
| |
|
|
|
|
|
|
| |
PR: 6240
Reviewed by: phk
Submitted by: Niall Smart rotel@indigo.ie
|
|
|
|
|
|
|
|
| |
libc to determine if locking is required. This is needed in libc
for use with kernel threads, but until a thread is created, we don't
really want to bother locking things. The variable was added here
because the crt code calls exit(main()) so all programs will get the
variable.
|
| |
|
| |
|
|
|
|
| |
__NETBSD_SYSCALLS is defined.
|
| |
|
| |
|