summaryrefslogtreecommitdiffstats
path: root/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2014-07-29 02:37:48 +0000
committerian <ian@FreeBSD.org>2014-07-29 02:37:48 +0000
commita7791b0d14f2339a7c2a2f4d39437e1cf62cba5e (patch)
treef707a4246d62b369e2d96a6b920f93c984bbe4fc /cddl/contrib/opensolaris/cmd/dtrace/dtrace.c
parentfb0b7ece8c535ffb830749971d981c39c7de9bf1 (diff)
downloadFreeBSD-src-a7791b0d14f2339a7c2a2f4d39437e1cf62cba5e.zip
FreeBSD-src-a7791b0d14f2339a7c2a2f4d39437e1cf62cba5e.tar.gz
A while back, the array of segments used for a load/mapping operation was
moved from the stack into the tag structure. In retrospect that was a bad idea, because nothing protects that array from concurrent access by multiple threads. This change moves the array to the map structure (actually it's allocated following the structure, but all in a single malloc() call). This also establishes a "sane" limit of 4096 segments per map. This is mostly to prevent trying to allocate all of memory if someone accidentally uses a tag with nsegments set to BUS_SPACE_UNRESTRICTED. If there's ever a genuine need for more than 4096, don't hesitate to increase this (or maybe make it tunable). Reviewed by: cognet
Diffstat (limited to 'cddl/contrib/opensolaris/cmd/dtrace/dtrace.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud