518 Commits

Author SHA1 Message Date
pooka
c6181c7b2f Re-add explanation of how to correctly use realloc. 2009-07-20 12:10:03 +00:00
yamt
99122f39e6 qsort: remove the "switch to insertion sort" optimization because it
causes catastrophic performance for certain inputs.
2009-06-01 06:37:40 +00:00
wiz
f6b43a0c43 Markup improvements. No need to mark up numbers as defined values, math
did the definition for us ages ago. Make HTML-ready.
2009-05-21 09:13:35 +00:00
christos
fd67370208 mention that these functions return 0 and set errno to ERANGE on invalid base. 2009-05-20 22:01:34 +00:00
wiz
5dd21e58d5 Grammar fix. 2009-05-18 09:00:02 +00:00
wiz
7d88f2f54f Revert parts of v1.25 (jemalloc):
Re-add RCS Id, remove superfluous .Pp, join line, comment out limits(1) xref.
2009-05-13 23:02:11 +00:00
joerg
71c479831e Fix markup. 2009-04-11 16:13:49 +00:00
joerg
cc420b6c04 ANSIfy. Remove conditionals around __RCSID. 2009-03-20 14:05:54 +00:00
joerg
cc5989d71d ANSIfy. Remove conditional macros around __RCSID. 2009-03-20 13:56:57 +00:00
joerg
9df66b68e0 Explicitly mark : as literal, use Pq. 2009-03-12 12:51:29 +00:00
joerg
edc0d6c151 Fix prologue. 2009-03-10 23:37:01 +00:00
lukem
9d1671f467 Fix sign-compare issues 2009-02-12 03:34:33 +00:00
lukem
19b046886f fix sign-compare issue 2009-02-12 03:12:36 +00:00
lukem
2360d0845a Apply some of FreeBSD libc/stdlib/malloc.c rev 1.162
to fix sign-compare issues.
2009-02-12 03:11:01 +00:00
lukem
957ba389e8 sign-compare fix 2009-01-30 23:46:03 +00:00
lukem
8a09e86085 sign-compare fix 2009-01-30 23:35:35 +00:00
ad
c984f259af Make threaded programs die correctly:
kill(getpid(), SIGFOO) -> raise(SIGFOO)
2009-01-30 23:21:02 +00:00
christos
461a86f9bd merge christos-time_t 2009-01-11 02:45:45 +00:00
ad
c6555ead19 Our qsort() is inappropriate for kernel use because it makes recursive
calls. Replace it with a kheapsort() function in kernel. Pointed out
by tron@.
2008-11-16 16:15:58 +00:00
ad
e5c4df967a Make qsort() available in libkern. 2008-11-16 15:01:26 +00:00
christos
035a506da3 use the right variable in memcpy. 2008-11-01 00:54:47 +00:00
christos
e34e014482 make __findenv return the offset for the new entry to be inserted when
the string is not found, to avoid an additional scan of the environ array
in setenv.
2008-10-31 17:46:04 +00:00
mrg
2f0d0e12bf define and use LIBCDIR in terms of .CURDIR. fixes compat/lib/libc build. 2008-10-26 07:43:07 +00:00
joerg
3ae583451f Prepare use of strtoull, strtoumax and strtoimax in tools/compat by
including nbtool_config.h.
2008-09-10 18:08:58 +00:00
christos
40d6ddde20 system(NULL) should return if the command interpreter is there or not.
Andy Shevchenko
2008-08-27 06:45:02 +00:00
drochner
14744ddade fix range of strtouq(), from Henning Petersen per PR lib/39399 2008-08-26 12:21:24 +00:00
joerg
245e086321 Unify the implementation of strto{l,ul,ll,ull,imax,umax,q,uq} into one
version for signed and one version for unsigned data types.

Add a check for supported bases and set errno (userland) or panic
(kernel, libsa) otherwise.

Make strto{ll,ull,imax,umax} normal symbols and just keep the underscore
versions as strong alias.

Obtained from DragonFly, based on the wide char version from Citrus.
Reviewed by christos@
2008-08-20 12:42:26 +00:00
matt
cac8e44915 Add C99 functions imaxabs and imaxdiv. 2008-08-04 21:29:27 +00:00
lukem
8897ce05a0 Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
2008-07-21 12:05:43 +00:00
ad
380c3da007 Split choose_arena() back out into inline and non-inline portions. 2008-06-23 10:46:25 +00:00
ad
88261d4ead Check to see if MALLOC_OPTIONS is actually set in the environment before
doing issetugid().
2008-06-05 00:16:34 +00:00
martin
11a6dbe728 Convert TNF licenses to new 2 clause variant 2008-04-30 13:10:46 +00:00
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
christos
23b2e3cd80 Fix another integer overflow issue discovered by Maksymilian Arciemowicz.
On top of this, limit the range of getnumber to 0x00ffffff to make sure
that adding two of them does not cause an integer overflow.
2008-03-27 21:50:30 +00:00
christos
00f5c7fe8d Avoid integer overflow; reported by Maksymilian Arciemowicz. 2008-03-18 18:16:08 +00:00
rmind
1c7eae5598 Use size_t to avoid overflow when sorting large arrays. While here, ANSIfy.
Obtained from FreeBSD (das@).
2008-03-11 18:04:59 +00:00
ad
91224074af Redo the CPU-based arena selection slightly differently. With the latest
libpthread and kernel, this mysteriously works without a problem.
2008-03-08 13:17:13 +00:00
christos
908cf676a4 mention RANDOM_MAX 2008-02-28 16:16:35 +00:00
xtraeme
c3e906d7a0 There's no need to do the mutex_trylock dance anymore in __cxa_finalize(),
just using mutex_lock() is enough.
2008-02-25 14:35:54 +00:00
xtraeme
1b5143aa5d Add a comment for __libc_atexit_init() missed in previous that was
available in the original patch.
2008-02-25 14:15:10 +00:00
xtraeme
95157b046e Make the atexit mutex recursive and initialize it in __libc_init()
as suggested by ad@, based on the patch provided by Sverre Froyen
in lib/37654.

Reviewed by ad@ and jmcneill@.
2008-02-25 14:06:13 +00:00
christos
ed13fe5855 fix posix_memalign; we are not going to support alignments > pagesize in
this implementation.
2008-02-03 22:56:53 +00:00
macallan
f53566168d make this compile again 2007-12-12 17:56:10 +00:00
simonb
179bda4711 Fix twalk()s 3rd argument name so that it matches rest of manpage and
the source code.
2007-12-07 07:33:13 +00:00
christos
b831a8ada2 move decls for _malloc_{pre,post}fork() to extern.h 2007-12-04 17:45:07 +00:00
christos
86ef91b80e - use a non localized version of strerror_r.
- kill localized declarations and let namespace.h do its work.
2007-12-04 17:43:51 +00:00
ad
8b96cb8a97 Back out the per-cpu arena changes. With this, ld.so magically stops
loading libc/libpthread twice -- which does not make sense, because it
has its own private malloc().
2007-12-01 22:44:44 +00:00
dsl
b3dec55727 Fix the other half of the 'store int as a thread specific pointer'/ 2007-11-30 17:44:38 +00:00
christos
e09a2e99e8 converting a pointer to unsigned is bad; use uintptr_t. 2007-11-30 17:09:22 +00:00
ad
49dcd767c3 Make the allocation arenas per-CPU in the most optimistic case, but
continue to 'stripe' by thread in case of contention.
2007-11-29 18:46:13 +00:00