| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| | |
Change standards section to reflect POSIX 1003.1-1990 conformance.
|
| |
| |
| |
| |
| |
| | |
Improve chances of troublefree 64bit operation. [imp]
Noticed by: Warner Losh <imp@village.org>
|
| |
| |
| |
| | |
Obtained from: OpenBSD, Thorsten Lockert <tholo@OpenBSD.ORG>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add progname to warning/error message layout. (joerg)
Remove inline assembler, no speed impact, not need for the obfuscation (bde)
Remove on the fly calculation of parameters, no longer critical.
Make D & U flags valid even if we don't support them.
Don't call imalloc until we're done initializing.
Zap contents on free() if we have "Junk" set. [*]
Various nitpicking.
[*] As a sideeffect of this change, if you are worried about
sensitive data lingering in memory, you can use the 'Junk' option
now to make sure phkmalloc zaps memory when it is returned. add
char * malloc_options = "J";
to your source. Obviously there is a performance impact.
|
| |
| |
| |
| | |
with the seed. Old variant will be available via libcompat soon.
|
| |
| |
| |
| | |
fix sbrk manpage while we're at it.
|
| |
| |
| |
| | |
Reviewed by: phk
|
| |
| |
| |
| | |
Submitted by: jdp
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Various neat features added. More documentation in the manpage.
If your machine has very little RAM, I guess that would be < 16M
these days :-(, you may want to try this:
ln -fs 'H<' /etc/malloc.conf
check the manpage.
|
| |
| |
| |
| |
| |
| |
| | |
as done after a quasi-recursive call to free() had modified what we
thought we knew about the last chunk of pages.
This bug manifested itself when I did a "make obj" from src/usr.sbin/lpr,
then make would coredump in the lpd directory.
|
| |
| |
| |
| | |
pointers of type `void *'. Warn about this in future.
|
| |
| |
| |
| |
| |
| |
| |
| | |
in a bunch of man pages.
Use the correct .Bx (BSD UNIX) or .At (AT&T UNIX) macros
instead of explicitly specifying the version in the text
in a bunch of man pages.
|
| |
| |
| |
| | |
of .Nm when referencing funciton names.
|
| |
| |
| |
| | |
minor cleanup.
|
| |
| |
| |
| | |
Submitted-By: Kent Vander Velden <graphix@iastate.edu>
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
by W.Richard Ste vens. EINTR handling suggested by bde@freebsd.org).
Code cleanup:
1. Add missing return type.
2. Replace 'union wait' by int.
3. Use Posix-style signal handling instead of signal().
4. Use fork() instead of deprecated vfork().
5. Block signals before fork()'ing, instead of after.
6. Return -1 if fork() fails, instead of 0.
7. Add EINTR handling for waitpid() call.
Also add claim of Posix conformance to man page.
|
| |
| |
| |
| |
| | |
wrong function type declarations, and wrong argument type
declarations.
|
| |
| |
| |
| |
| | |
This commit covers most of the ANSI library functions. Many others only
need <sys/types.h> because they use u_xxx.
|
| | |
|
| |
| |
| |
| |
| | |
converted them into .Fn macros where appropriate. Also fixed
up some minor formatting problems.
|
| |
| |
| |
| |
| |
| |
| |
| | |
in the main text of various man pages.
Thanks to Warner Losh for adding an option to manck to allow
it to scan the entire man page looking for bogus xrefs, instead
of just checking the SEE ALSO section.
|
| |
| |
| |
| |
| |
| | |
try and silence "manck".
ncurses, rpc, and some of the gnu stuff are still a big mess, however.
|
| | |
|
| |
| |
| |
| |
| |
| | |
Submitted by: John Birrel(L?)
changes for threadsafe operations
|
| |
| |
| |
| | |
was some datum given).
|
| |
| |
| |
| | |
Found by: Lars Fredriksen <fredriks@mcs.com>
|
| |
| |
| |
| | |
which included commits to RCS files with non-trunk default branches.
|
| | |
|
| |
| |
| |
| |
| | |
Reviewed by: phk
Submitted by: Kaleb Keithly <kaleb@x.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
via mmap() up around the shared library area. Previously the directory
was allocated from space from it's own memory pool. Because of the way it
was being extended on processes with large malloced data segments (ie: inn)
once the page directory was extended for some reason, it was not possible
to lower the heap size any more to return pages to the OS.
(If my understanding is correct, page directory expansion occurs at 4MB,
12MB, 20MB, 28MB, etc.) I was seeing INN allocate a large amount of short
term memory, pushing it over the 28MB mark, and once it's transient demands
hit 28MB, it never freed it's pages and swap space again.)
I've been running this in my libc for about a month...
Also, seperate MALLOC_STATS from EXTRA_SANITY.. I found it useful to call
malloc_dump() from within INN from a ctlinnd command to see where the hell
all the memory was going.. :-) I've left MALLOC_STATS enabled, as it has
no run-time or data storage cost.
Reviewed by: phk
|
| | |
|
| | |
|
| |
| |
| |
| | |
use strncmp()..
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
"zero' and 'junk' options to help find and diagnose malloc abuse.
EXTRA_SANITY defaults "junk" to on.
Don't dump the internal state, unless EXTRA_SANITY.
General code cleanup.
Error messages cleaned up a bit, more checking earlier.
EXTRA_SANITY is default at this time (just in case).
Performance (without EXTRA_SANITY) is better, beats gnumalloc in
both time & space most of the time:
# In-memory test.
./malloc 50000000 2000 8192
159.2u 1.5s 2:41.85 99.3% 5+7742k 0+0io 0pf+0w
./gnumalloc 50000000 2000 8192
272.6u 0.4s 4:35.01 99.3% 5+8533k 0+0io 0pf+0w
# Swap-space test.
./malloc 500000 14000 8192
6.5u 4.1s 4:08.87 4.3% 5+49209k 0+0io 9772pf+0w
./gnumalloc 500000 14000 8192
16.2u 14.5s 15:36.14 3.2% 5+54100k 0+0io 47651pf+0w
# Small items test.
./malloc 20000000 20000 2048
67.0u 0.3s 1:07.83 99.2% 5+18199k 0+0io 4pf+0w
./gnumalloc 20000000 20000 2048
66.2u 0.3s 1:07.03 99.3% 5+18107k 0+0io 0pf+0w
SANITY is not an option anymore. (!!)
|
| |
| |
| |
| | |
Submitted by: Mike Pritchard <mpp@mpp.minn.net>
|
| |
| |
| |
| |
| |
| |
| | |
Performance is comparable to gnumalloc if you have sufficient RAM, and
it screams around it if you don't.
Compiled with "EXTRA_SANITY" until further notice.
see malloc.3 for more details.
|
| |
| |
| |
| | |
instead of hardcoded whitespaces
|
| |
| |
| |
| | |
in 8bit environment (isalpha at the end of digits)
|
| |
| |
| |
| |
| |
| | |
like 38400<any 8bit char, isalpha> it not detect this stuff and
produce very big number instead. Fixed by operating with unsigned char
and checking for isascii. (secure/telnetd hits by it f.e.)
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Grrr. If the dbhash routines weren't grossly overengineered I wouldn't
even need to do this! :-(
Also now export the hash_stats routine. Manpage coming RSN - I promise.
|
| | |
|
| |
| |
| |
| |
| | |
that the db/hash functions don't, and they're much simpler to use for
low-overhead string hashing.
|
| |
| |
| |
| |
| | |
realpath() still accepts "" as an arg and converts it to a canonical
pathname for the current directory.
|
| |
| |
| |
| | |
or depend on <stdio.h> bogusly including it.
|
| |
| |
| |
| |
| | |
my machine, and a simple static (genassym) and shared (sysctl) executable
both work. Still to be done: RPCand YP merge.
|
|\ \
| |/
| |
| | |
which included commits to RCS files with non-trunk default branches.
|