otto
7f73468da7
Make struct chunk_info a variable sized struct, wasting less
space for meta data by only allocating space actually needed for
the bitmap (modulo alignment requirements). ok deraadt@
13 years ago
jmc
16f1cecda2
some minor tweaks;
13 years ago
jmc
f30a4c031e
make -column lists pretty again;
specifically, rewrite them to permit some markup in the column headers,
and use "Ta" instead of literal tabs; mandoc does not currently match groff
100%, but a mandoc fix may be some time off, and we've gone enough releases
with poorly formatting column lists.
in some cases i have rewritten the lists as -tag, where -column made
little sense.
13 years ago
jmc
a9a87846de
in column lists, enforce the following ordering:
.Bl -column header1 header2 ... <Bl flags>
mixing things up confuses mandoc, and adding flags in can screw up the list.
this hopefully just makes things a bit safer (and more consistent).
(one more bit of work left and all column lists should format how we want)
13 years ago
jmc
758ce3a339
tweak previous;
13 years ago
schwarze
52886b1c8c
update HISTORY and SEE ALSO for all of string(3), together with various
smaller improvements; jmc@ and nicm@ both ask me to get this in because
further tweaking will be easier in-tree
13 years ago
jmc
5d26e77ff3
occured -> occurred;
13 years ago
miod
3f8c480969
Recent Single Unix will malloc memory if the second argument of realpath()
is NULL, and third-party software is starting to rely upon this.
Adapted from FreeBSD via Jona Joachim (jaj ; hcl-club , .lu), with minor
tweaks from nicm@ and yours truly.
13 years ago
millert
331d605754
Sync wcslcpy and wcslcat with strlcpy and strlcat. OK deraadt@
13 years ago
otto
10c1e27ddb
Show (in the example) that < and > can be used multiple times; ok jmc@
jasper@
13 years ago
jasper
32dcb18e53
- add a MALLOC_OPTIONS section header. the content is already there, but having
a section will help people looking for just the MALLOC_OPTIONS.
ok otto@ jmc@
13 years ago
otto
d6855c0895
on malloc flag S, set cache size to 0; will catch even more
use-after-free bugs; ok krw@ dlg@ pirofti@
13 years ago
nicm
7eb859116b
Minor function name tweaks.
13 years ago
nicm
fbd15bedaa
Instead of documenting all the wide string functions in wmemchr(3), add
individual pages (based on the existing string man pages). By Tim van
der Molen (tbvdm at xs4all dot nl) after a suggestion by millert@.
ok deraadt
13 years ago
nicm
73506d1ba1
After a certain amount of fighting with the mbstowcs API, remove L from
the wcsdup example.
ok stsp
13 years ago
jmc
fef4fd0bd9
no more math(3);
13 years ago
nicm
0cded3a64f
Fix some awful code in the example, pointed out by millert@.
13 years ago
nicm
69ccac0496
Add wcsdup(), from NetBSD.
ok deraadt matthew
13 years ago
jsing
4a0a502bf4
Do not mask errno if we fail to open /dev/diskmap. Also, fall through
rather than returning so that realname still gets assigned.
ok millert@ deraadt@ thib@
13 years ago
sthen
ec4391eaa9
s/ands/and/, from Tobias Ulmer
13 years ago
tedu
d874c625f1
as man page states, lower case undoes upper case. add support for little s,
no security, for consistency. use of this option is discouraged. :)
ok deraadt guenther millert
13 years ago
naddy
eea0705fca
fix wcscasecmp() parameters; <wchar.h> was correct
13 years ago
jmc
091afd940e
tweak previous (my fault);
13 years ago
espie
7b1036f191
wcs(n)casecmp support, manpage comments from jmc@, okay deraadt@
13 years ago
otto
be0afe8548
save errno dance in wrterror() and malloc_dump(); prompted by and ok deraadt@
13 years ago
otto
535636b5df
introduce symbolic constant for initial number of regions
13 years ago
otto
01b4849121
zap regions_bits and rework MALLOC_MAXSHIFT a bit; ok djm@
13 years ago
otto
6ebcec8c72
Avoid fp computations for stats, this make calling malloc_dump() safe in more
cases.
13 years ago
otto
86e4380bcc
fix comment, the bitmap is an array of u_short now
13 years ago
otto
fc442e2a61
Introduce leak detection code for MALLOC_STATS
13 years ago
otto
e726d97c87
Move MALLOC_STATS code to bottom of file, so the real stuff is more at the top.
13 years ago
otto
0ec9d0391a
Up until now, malloc scanned the bits of the chunk bitmap from
position zero, skipping a random number of free slots and then
picking the next free one. This slowed things down, especially if
the number of full slots increases.
This changes the scannning to start at a random position in the
bitmap and then taking the first available free slot, wrapping if
the end of the bitmap is reached. Of course we'll still scan more
if the bitmap becomes more full, but the extra iterations skipping
free slots and then some full slots are avoided.
The random number is derived from a global, which is incremented
by a few random bits every time a chunk is needed (with a small optimization
if only one free slot is left).
Thanks to the testers!
13 years ago
otto
fe5a32734e
Now that we use an array of u_short for the chunk bitmap change a few
1UL to 1U.
13 years ago
otto
dcc6e6f049
More efficient scanning for free chunks while not losing any randomization;
thanks to all testers.
13 years ago
otto
9679bf7a9f
Tweak the description of the optional parts around =. Found this in my
tree, no idea where it came from; ok millert@ jmc@
13 years ago
stsp
4ddc8c789a
Add a wcswidth man page (based on FreeBSD), and fix the implementation
to return -1 in case of an unprintable character.
ok nicm jmc
13 years ago
espie
9766982215
tweak for clarity, ok millert@, jmc@
13 years ago
deraadt
563890ecd9
wrong type for variable; spotted by christian.siebert@cs.tu-chemnitz.de
ok guenther
14 years ago
guenther
48c37b4271
Fix PR 6267: recheck POSIXLY_CORRECT each time getopt_long() starts a new
argv and don't suppress the handling of leading '-' in optstring when
POSIXLY_CORRECT is set.
Based on patch from Eric Blake.
ok and manpage update from millert@, manpage ok jmc@
14 years ago
claudio
2528dce4db
Correct msgbuf_write() example. OK jmc@ and nicm@
14 years ago
matthew
a86644214c
Fix __cxa_finalize() so that calling __cxa_finalize(NULL) properly
invokes handlers registered with __cxa_atexit().
"seems right" deraadt@
14 years ago
schwarze
07ff512110
Correctly escape a literal colon in an enclosure;
the \: roff escape is an optional line break.
14 years ago
jmc
aae2647dbc
superceded -> superseded;
14 years ago
krw
d15a9b6dbc
Update to better describe reality, i.e. disklabel(8) UID usage.
ok jmc@ jsing@
14 years ago
millert
58a7be37c3
Do not attempt to prepend /dev/ to path if it already contains a slash.
OK jsing@
14 years ago
otto
c709ba9eaa
remove comment that hasn't been true for quite a while now;
ok deraadt@ djm@
14 years ago
millert
aab35837b7
Always return a pointer to the static buffer in realpath, even if
path and realpath are the same. This matches the manual and avoids
a bogus cast to non-const. OK jsing@, previous version OK kettenis@
14 years ago
millert
642ed026af
opendev() path argument should be const. OK deraadt@
14 years ago
dhill
bc96223819
avoid pointer arithmetic on void *
tested for a while by me.
ok otto@
14 years ago
jmc
6a45e9cb55
involes -> involves; from Carlos Alberto Pereira Gomes
14 years ago