Commit Graph
164 Commits
Author SHA1 Message Date
Brian Somers 1a51451d83 MFC: Only realloc() environ if we're sure that we know where it came from. 2000-09-20 19:46:03 +00:00
Jordan K. Hubbard 6c05034cbe MFC: Use strtok instead of strsep. Handle links explicitly in remove.
Check additional failure case in getopt.
2000-09-20 04:43:13 +00:00
John Baldwin 91d04eff70 MFC:
- Add a missing THREAD_UNLOCK()
- Remove allocation failure check from 'A' option, the 'X' option does
  this as a standalone check now.
2000-08-23 00:12:17 +00:00
John Baldwin 6c7f93e6a8 MFC: Binary search tree code. 2000-08-17 07:38:39 +00:00
cvs2svn 394b56b7ca This commit was manufactured by cvs2svn to create branch 'RELENG_4'. 2000-07-04 02:06:01 +00:00
Kris Kennaway 2cb84d580d MFC: Typo, update example code 2000-06-08 07:18:03 +00:00
Mike Pritchard abdb48432b MFC: minor mdoc cleanup. 2000-05-24 13:24:04 +00:00
Sheldon Hearn 53ef40deb9 MFC: Fix miscellaneous mdoc macro argument limit infringements. 2000-05-09 14:12:53 +00:00
Alexey Zelkin ee8dc4da91 MFC: Use `Er' variable to define first column width in ERRORS section. 2000-05-06 13:34:15 +00:00
Alexey Zelkin 95f2a89368 MFC: introduce .Lb macro to libc manpages 2000-04-22 17:07:11 +00:00
Jason Evans 058b24af1b MFC: For libc_r, do not create both weak and strong symbols of the same
name.
2000-03-18 23:13:29 +00:00
cvs2svn 842f308487 This commit was manufactured by cvs2svn to create branch 'RELENG_4'. 2000-03-13 04:59:44 +00:00
Chris Costello cfc2d91b25 Merge from RELENG_3 (oops):
resolved_name	-> resolved_path
    resolvedname	-> resolved_path
2000-01-29 19:43:25 +00:00
Jason Evans 9233c4d942 Simplify sytem call renaming. Instead of _foo() <-- _libc_foo <-- foo(),
just use _foo() <-- foo().  In the case of a libpthread that doesn't do
call conversion (such as linuxthreads and our upcoming libpthread), this
is adequate.  In the case of libc_r, we still need three names, which are
now _thread_sys_foo() <-- _foo() <-- foo().

Convert all internal libc usage of: aio_suspend(), close(), fsync(), msync(),
nanosleep(), open(), fcntl(), read(), and write() to _foo() instead of foo().

Remove all internal libc usage of: creat(), pause(), sleep(), system(),
tcdrain(), wait(), and waitpid().

Make thread cancellation fully POSIX-compliant.

Suggested by:	deischen
2000-01-27 23:07:25 +00:00
Ruslan Ermilov 7e20508477 o Back out rev 1.4 - reallocf() failure clobbers existing `environ'.
o Do not override `environ' if realloc() fails, leave it intact.
o Set `alloced' only when memory is actually allocated.

PR:		bin/5604 (2nd part)
Reviewed by:	bde
2000-01-27 16:12:03 +00:00
Archie Cobbs 5059d6a601 Document the memory leak that is inherent in FreeBSD's semantics
for getenv()/putenv().

PR:	10341 5604
2000-01-26 22:10:56 +00:00
Jason Evans 929273386f Add three-tier symbol naming in support of POSIX thread cancellation
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().
2000-01-12 09:23:48 +00:00
Tim Vanderhoek 838fb327f2 Make example for handling "-##" work and comply with style(9). Still
doesn't handle nastier corner cases such as "-j3 -33" correctly.  <shrug>

PR:		docs/12994 (James Howard <[email protected]>)
2000-01-06 01:25:15 +00:00
Tim Vanderhoek e99fd39264 Add history: The reallocf() function first appeared in FreeBSD-3.0.
See imp's [email protected] in freebsd-hackers (the
reallocf.c cvs history mistakenly refers to freebsd-current).
1999-12-28 15:14:59 +00:00
Bruce Evans fb59427e5c Fixed missing installation of a link to rand_r.3. 1999-12-23 16:00:50 +00:00
Sheldon Hearn b3c5295256 Document the current behaviour with respect to the handling of errno.
Approved by:	phk
1999-12-22 17:04:46 +00:00
Jordan K. Hubbard f8d7aff7a0 Fix handling of trailing :'s to match what other OSes do (spit out
a diagnostis).

Submitted by:	Guy Harris <[email protected]>
1999-12-17 01:52:15 +00:00
Chris Costello a70b5c6a96 Add a cross-reference to fabs(3) man page.
PR:		docs/15337
Submitted by:	Bruce A. Mah <[email protected]>
1999-12-07 23:09:58 +00:00
Kris Kennaway a8b4fa4aaf Typo
Obtained from:	OpenBSD
1999-11-15 03:13:23 +00:00
Peter Wemm 0d052386ba Go to a bit more trouble to make it absolutely clear that malloc(3)
does not zero the allocated memory.
1999-11-12 16:41:21 +00:00
Chris Costello 0df0b5481f Change .Fn to .Xr on a couple of lines where abort(3) is referenced. 1999-09-25 22:42:12 +00:00
Peter Wemm b60a120f4b Tidy up $Log$ debris. 1999-09-05 17:42:45 +00:00
Peter Wemm a1a4f1a0d8 $Header$ -> $FreeBSD$ 1999-08-28 05:11:36 +00:00
Peter Wemm 7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
Mike Pritchard 74804d58a0 Various man page cleanup:
- 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 <[email protected]>
1999-08-15 09:51:25 +00:00
Chris Costello a251398eea Fix .Xr line for `getpagesize' 1999-08-14 07:33:15 +00:00
Tim Vanderhoek cc5aedfb1a Mention that EXIT_SUCCESS and EXIT_FAILURE are preferred over
sysexits.h-values as exit codes for portable programs.
1999-08-01 20:46:45 +00:00
Nik Clayton fbc400a67a Add $Id$, to make it simpler for members of the translation teams to
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
1999-07-12 20:50:10 +00:00
Dag-Erling Smørgrav 65b97b034e Back out previous commit after discussing it with Dmitrij Tejblum. 1999-07-07 21:01:20 +00:00
Dag-Erling Smørgrav c58b5cffa1 Always set errno to ENOMEM when returning 0 from malloc() or realloc().
Approved by:	phk
1999-07-07 19:54:08 +00:00
Wes Peters b7edcd43b5 Added Posix rand_r function. 1999-05-24 23:30:14 +00:00
Poul-Henning Kamp 5b26e84968 Disable the "Hint" option in phkmalloc as default. Recent VM system
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 ?)
1999-03-28 14:16:05 +00:00
Guy Helmer 6e062fe1b7 Correct synopsys: getsubopt is declared in unistd.h, not stdlib.h.
PR:		docs/9376
1999-03-02 02:35:57 +00:00
Andrey A. Chernov be92e0e6cd fix tabs lost apparently in copy&paste 1999-02-12 19:45:53 +00:00
Joseph Koshy 221188c6cb Clarify format of exit status code. Note when a return code of -1 can
be expected.

PR:		docs/9701
Submitted by:	Marc van Kempen <[email protected]>
1999-01-27 03:54:09 +00:00
Robert Nordier 8d2c3c32bd Include mergesort() in description of errors. 1998-11-04 09:27:03 +00:00
Robert Nordier df5a1b840e Drop unused labels. 1998-11-04 09:22:07 +00:00
Robert Nordier 7fb5f2bae4 Handle a zero elements argument.
PR:		8566
Submitted by:	Archie Cobbs <[email protected]>
1998-11-04 08:55:34 +00:00
John Birrell a0aa389007 Delete the XXX comments that refer to spinlock recursion. The malloc/free/
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.
1998-09-30 06:13:59 +00:00
Doug Rabson cea1d019fe Use 8k pagesize on alpha, not 4k. 1998-09-23 21:26:04 +00:00
Alexander Langer d988805a1f Back out part of previous commit (even though it's technically correct).
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.
1998-09-20 01:07:50 +00:00
Alexander Langer 366248e086 Correctly back out of free if a recursive call into malloc.c is detected.
Set malloc_func *after* grabbing the thread lock.

Noticed by:	Simon Coggins <[email protected]>
1998-09-19 20:55:36 +00:00
Warner Losh e8420087b0 Replace memory leaking instances of realloc with non-leaking reallocf.
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...
1998-09-16 04:17:47 +00:00
Warner Losh e70c6df958 o Don't reference non-existant function freealloc.
o Properly order things

Pointed out by: bde
1998-09-16 04:07:31 +00:00
Warner Losh 9a5722f2e8 Fix style problems noted by Bruce:
o No copyright on reallocf.
	o Order makefile list correctly.
	o indent reallocf properly.
1998-09-16 03:16:06 +00:00