| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
Reported and tested by: Fabian Keil <freebsd-listen fabiankeil de>
MFC after: 17 days
Notes:
svn path=/head/; revision=211894
|
|
|
|
|
|
|
|
|
| |
their implementations aren't in the same files. Introduce LIBC_ARCH
and use that in preference to MACHINE_CPUARCH. Tested by amd64 and
powerpc64 builds (thanks nathanw@)
Notes:
svn path=/head/; revision=211774
|
|
|
|
|
|
|
|
| |
Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want
to test of all the CPUs of a given family conform.
Notes:
svn path=/head/; revision=211725
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
atexit and __cxa_atexit handlers that are either installed by unloaded
dso, or points to the functions provided by the dso.
Use _rtld_addr_phdr to locate segment information from the address of
private variable belonging to the dso, supplied by crtstuff.c. Provide
utility function __elf_phdr_match_addr to do the match of address against
dso executable segment.
Call back into libthr from __cxa_finalize using weak
__pthread_cxa_finalize symbol to remove any atfork handler which
function points into unloaded object.
The rtld needs private __pthread_cxa_finalize symbol to not require
resolution of the weak undefined symbol at initialization time. This
cannot work, since rtld is relocated before sym_zero is set up.
Idea by: kan
Reviewed by: kan (previous version)
MFC after: 3 weeks
Notes:
svn path=/head/; revision=211706
|
|
|
|
|
|
|
| |
MFC after: 3 days
Notes:
svn path=/head/; revision=211704
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
number of host CPUs and osreldate.
This eliminates the last sysctl(2) calls from the dynamically linked image
startup.
No objections from: kan
Tested by: marius (sparc64)
MFC after: 1 month
Notes:
svn path=/head/; revision=211416
|
|
|
|
|
|
|
|
|
| |
translating these manual pages. Minor corrections by me.
Submitted by: Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp>
Notes:
svn path=/head/; revision=211397
|
|
|
|
| |
Notes:
svn path=/head/; revision=210933
|
|
|
|
|
|
|
|
| |
see problems described in the comment to:
http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/128933
Notes:
svn path=/head/; revision=210853
|
|
|
|
| |
Notes:
svn path=/head/; revision=210765
|
|
|
|
|
|
|
| |
Obtained from: projects/ppc64
Notes:
svn path=/head/; revision=209878
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
finished using it. This allows the mutex's allocated memory to be
freed.
This is one sense a rather silly change, since at this point we're
less than a microsecond away from calling _exit; but fixing this
memory leak is likely to make life easier for anyone trying to
track down other memory leaks.
Notes:
svn path=/head/; revision=209117
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bottom of the manpages and order them consistently.
GNU groff doesn't care about the ordering, and doesn't even mention
CAVEATS and SECURITY CONSIDERATIONS as common sections and where to put
them.
Found by: mdocml lint run
Reviewed by: ru
Notes:
svn path=/head/; revision=208027
|
|
|
|
|
|
|
|
|
|
|
| |
go ahead and remove the hint.
PR: 143944
Submitted by: Jeremy Huddleston <jeremyhu@apple.com>
MFC after: 1 week
Notes:
svn path=/head/; revision=207946
|
|
|
|
|
|
|
|
| |
Suggested by: bde
MFC after: 2 weeks
Notes:
svn path=/head/; revision=207009
|
|
|
|
|
|
|
|
|
|
| |
of NULL and changed type in declaration.
Suggested by: bde
MFC after: 2 weeks
Notes:
svn path=/head/; revision=206998
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add small optimization, do not copy a string to the buffer that is
to be freed immediately after.
Noted by: jh [1]
Reviewed by: jh
MFC after: 2 weeks
Notes:
svn path=/head/; revision=206898
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SUSv4 requires that implementation returns EINVAL if supplied path is NULL,
and ENOENT if path is empty string [1].
Bring prototype in conformance with SUSv4, adding restrict keywords.
Allow the resolved path buffer pointer be NULL, in which case realpath(3)
allocates storage with malloc().
PR: kern/121897 [1]
MFC after: 2 weeks
Notes:
svn path=/head/; revision=206893
|
|
|
|
|
|
|
|
|
|
|
| |
Although groff_mdoc(7) gives another impression, this is the ordering
most widely used and also required by mdocml/mandoc.
Reviewed by: ru
Approved by: philip, ed (mentors)
Notes:
svn path=/head/; revision=206622
|
|
|
|
|
|
|
|
|
|
|
| |
System V compatibility option (malloc "V" flag) is in effect a zero sized
reallocf() could cause a double free.
PR: bin/141753
Submitted by: Dan Lukes
Notes:
svn path=/head/; revision=204636
|
|
|
|
|
|
|
| |
insert/remove speed by ~30%.
Notes:
svn path=/head/; revision=204493
|
|
|
|
|
|
|
| |
like ia64, leave it empty (default model).
Notes:
svn path=/head/; revision=203969
|
|
|
|
|
|
|
|
|
| |
the static TLS model, which is fundamentally different from the dynamic
TLS model. The consequence was data corruption. Limit the attribute to
i386 and amd64.
Notes:
svn path=/head/; revision=203950
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/143350
Empty string test gone wrong.
Testing this requires that you have a locale that has the sign string
unset but has int_n_sign_posn set (the default locale falls through to
use "()" around negative numbers which is probably another bug).
I created that setup by hand and indeed without this fix negative
numbers are put out as positive numbers (doesn't fall through to use
"-" as default indicator).
Unfixed example in nl_NL.ISO8859-1 with lc->negative_sign set to empty
string:
strfmon(buf, sizeof(buf), "%-8i", -42.0);
==>
example2: 'EUR 42,00' 'Eu 42,00'
Fixed:
example2: 'EUR 42,00-' 'Eu 42,00-'
This file and suggested fix are identical in at least freebsd-8.
Backport might be appropriate but some expert on locales should
probably have a look at us defaulting to negative numbers in
parenthesis when LC_* is default. That doesn't look right and is not
what other OSes are doing.
PR: 143350
Submitted by: Corinna Vinschen
Reviewed by: bug reporter submitted, tested by me
Notes:
svn path=/head/; revision=203734
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix a race in chunk_dealloc_dss().
* Check for allocation failure before zeroing memory in base_calloc().
Merge enhancements from a divergent version of jemalloc:
* Convert thread-specific caching from magazines to an algorithm that is
more tunable, and implement incremental GC.
* Add support for medium size classes, [4KiB..32KiB], 2KiB apart by
default.
* Add dirty page tracking for pages within active small/medium object
runs. This allows malloc to track precisely which pages are in active
use, which makes dirty page purging more effective.
* Base maximum dirty page count on proportion of active memory.
* Use optional zeroing in arena_chunk_alloc() to avoid needless zeroing
of chunks. This is useful in the context of DSS allocation, since a
long-lived application may commonly recycle chunks.
* Increase the default chunk size from 1MiB to 4MiB.
Remove feature:
* Remove the dynamic rebalancing code, since thread caching reduces its
utility.
Notes:
svn path=/head/; revision=203329
|
|
|
|
|
|
|
|
|
|
| |
deallocate.
Submitted by: Ryan Stone (rysto32 at gmail dot com)
Approved by: jasone
Notes:
svn path=/head/; revision=203077
|
|
|
|
|
|
|
| |
initialization of ssize_invs.
Notes:
svn path=/head/; revision=200345
|
|
|
|
|
|
|
|
|
| |
as intended.
PR: standards/138307
Notes:
svn path=/head/; revision=200340
|
|
|
|
|
|
|
| |
thorough security review has been completed.
Notes:
svn path=/head/; revision=200198
|
|
|
|
|
|
|
|
|
|
| |
of setenv(), putenv() and unsetenv() when dealing with corrupt entries in
environ. They now output a warning and complete their task without error.
MFC after: 1 week
Notes:
svn path=/head/; revision=200195
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instead of returning an error if a corrupt (not a "name=value" string) entry
in the environ array is detected when (re)-building the internal
environment. This should prevent applications or libraries from
experiencing issues arising from the expectation that these calls will
complete even with corrupt entries. The behavior is now as it was prior to
7.0.
Reviewed by: jilles
MFC after: 1 week
Notes:
svn path=/head/; revision=200191
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
find a variable. Include a note that it must not cause the internal
environment to be generated since malloc() depends upon getenv(). To call
malloc() would create a circular dependency.
Recommended by: green
Approved by: jilles
MFC after: 1 week
Notes:
svn path=/head/; revision=200190
|
|
|
|
|
|
|
|
| |
I've only fixed code that seems to be written by `us'. There are still
many warnings like this present in resolv/, rpc/, stdtime/ and yp/.
Notes:
svn path=/head/; revision=200150
|
|
|
|
|
|
|
| |
modified so that it will abort when the environment is bad.
Notes:
svn path=/head/; revision=199987
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
**environ entries. This puts non-getenv(3) operations in line with
getenv(3) in that bad environ entries do not cause all operations to
fail. There is still some inconsistency in that getenv(3) in the
absence of any environment-modifying operation does not emit corrupt
environ entry warnings.
I also fixed another inconsistency in getenv(3) where updating the
global environ pointer would not be reflected in the return values.
It would have taken an intermediary setenv(3)/putenv(3)/unsetenv(3)
in order to see the change.
Notes:
svn path=/head/; revision=199983
|
|
|
|
|
|
|
|
|
| |
in order to distinguish it from free(NULL), which is logged as (0, 0, 0).
Reviewed by: jhb
Notes:
svn path=/head/; revision=199264
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a large page size that is greater than malloc(3)'s default chunk size but
less than or equal to 4 MB, then increase the chunk size to match the large
page size.
Most often, using a chunk size that is less than the large page size is not
a problem. However, consider a long-running application that allocates and
frees significant amounts of memory. In particular, it frees enough memory
at times that some of that memory is munmap()ed. Up until the first
munmap(), a 1MB chunk size is just fine; it's not a problem for the virtual
memory system. Two adjacent 1MB chunks that are aligned on a 2MB boundary
will be promoted automatically to a superpage even though they were
allocated at different times. The trouble begins with the munmap(),
releasing a 1MB chunk will trigger the demotion of the containing superpage,
leaving behind a half-used 2MB reservation. Now comes the real problem.
Unfortunately, when the application needs to allocate more memory, and it
recycles the previously munmap()ed address range, the implementation of
mmap() won't be able to reuse the reservation. Basically, the coalescing
rules in the virtual memory system don't allow this new range to combine
with its neighbor. The effect being that superpage promotion will not
reoccur for this range of addresses until both 1MB chunks are freed at some
point in the future.
Reviewed by: jasone
MFC after: 3 weeks
Notes:
svn path=/head/; revision=197524
|
|
|
|
|
|
|
|
|
|
| |
according to the 'V' option.
PR: standards/138307
MFC after: 1 week
Notes:
svn path=/head/; revision=196861
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When I wrote the pseudo-terminal driver for the MPSAFE TTY code, Robert
Watson and I agreed the best way to implement this, would be to let
posix_openpt() create a pseudo-terminal with proper permissions in place
and let grantpt() and unlockpt() be no-ops.
This isn't valid behaviour when looking at the spec. Because I thought
it was an elegant solution, I filed a bug report at the Austin Group
about this. In their last teleconference, they agreed on this subject.
This means that future revisions of POSIX may allow grantpt() and
unlockpt() to be no-ops if an open() on /dev/ptmx (if the implementation
has such a device) and posix_openpt() already do the right thing.
I'd rather put this in the manpage, because simply mentioning we don't
comply to any standard makes it look worse than it is. Right now we
don't, but at least we took care of it.
Approved by: re (kib)
MFC after: 3 days
Notes:
svn path=/head/; revision=196508
|
|
|
|
|
|
|
| |
Submitted by: Christoph Mallon
Notes:
svn path=/head/; revision=194703
|
|
|
|
| |
Notes:
svn path=/head/; revision=191789
|
|
|
|
| |
Notes:
svn path=/head/; revision=189207
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A more elegant way of obtaining a name of a character device by its file
descriptor on FreeBSD, is to use the FIODGNAME ioctl. Because a valid
file descriptor implies a file descriptor is visible in /dev, it will
always resolve a valid device name.
I'm adding a more friendly wrapper for this ioctl, called fdevname(). It
is a lot easier to use than devname() and also has better error
handling. When a device name cannot be resolved, it will just return
NULL instead of a generated device name that makes no sense.
Discussed with: kib
Notes:
svn path=/head/; revision=188497
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
stating that in FreeBSD the atol() and atoll() functions affect
errno in the same way as strtol() and stroll().
PR: docs/126487
Submitted by: edwin
Reviewed by: trhodes, gabor
MFC after: 1 week
Notes:
svn path=/head/; revision=188305
|
|
|
|
|
|
|
| |
Reported by: kib
Notes:
svn path=/head/; revision=185514
|
|
|
|
|
|
|
|
|
| |
spinning is avoided due to running on a single-CPU system.
Reported by: stefanf
Notes:
svn path=/head/; revision=185483
|
|
|
|
|
|
|
| |
Reported by: davidxu
Notes:
svn path=/head/; revision=185468
|
|
|
|
|
|
|
|
|
|
| |
potential extreme contention in the kernel for multi-threaded applications
on SMP systems.
Reported by: kris
Notes:
svn path=/head/; revision=184602
|
|
|
|
|
|
|
|
|
|
| |
Allow to define MALLOC_PRODUCTION with a make variable instead of polluting
the global CFLAGS.
Reviewed by: jasone
Notes:
svn path=/head/; revision=183969
|
|
|
|
|
|
|
|
|
| |
page size and using sysconf(3).
Suggested by: marcel
Notes:
svn path=/head/; revision=182906
|