Age | Commit message (Collapse) | Author | |
---|---|---|---|
2021-05-16 | panic does not require a \n at the end. When one is provided, it looks wrong. | Theo de Raadt | |
2021-04-21 | Convert remaining uvm_km_zalloc(9) to km_alloc(9). | Martin Pieuchot | |
Tested by bluhm@, jj@, kettenis@ and Scott Bennett. ok kettenis@ | |||
2021-02-23 | remove unused malloc_roundup() | Jonathan Gray | |
2020-12-31 | Add trace points for malloc(9) and free(9). This makes them traceable | Claudio Jeker | |
via dt(4) and btrace(8). OK mpi@ millert@ | |||
2020-10-14 | delete strange historical FFS_SOFTUPDATES ifdef... | Theo de Raadt | |
ok millert | |||
2019-12-19 | Convert infinite sleeps to {m,t}sleep_nsec(9). | Martin Pieuchot | |
ok visa@ | |||
2019-11-28 | Delete km_mapblocks from kmemstats and its always-zero column from the ddb | Philip Guenther | |
"show malloc" output ok deraadt@ mpi@ | |||
2019-05-15 | rework the zero warning slightly, and more completely disable until we're | Ted Unangst | |
more ready to deal with the noise. | |||
2019-05-09 | disable stack printing for now since at least arm64 can't print them | Ted Unangst | |
reported by kettenis | |||
2019-05-08 | print a few warnings when calling free with a zero size. | Ted Unangst | |
let's see what falls out. ok beck deraadt kettenis mpi | |||
2018-07-10 | In free(9) call wakeup() after mtx_leave() consistently. | Alexander Bluhm | |
OK kettenis@ visa@ mpi@ | |||
2018-07-09 | Fix trailing whitespaces and too long line. | Alexander Bluhm | |
2018-07-09 | Make free(9) MP safe. It was wrong to set ku_indx to 0 after freeing | Alexander Bluhm | |
the memory in uvm. Another process could use the false 0 then. To be on the safe side, protect all access to ku_indx and ku_pagecnt with a mutex. Update ku_indx and ku_pagecnt before calling uvm_km_free(). Update ksp after uvm_km_free() to keep accounting correct. tested by sthen@; OK mpi@ visa@ deraadt@ | |||
2018-01-18 | While booting it does not make sense to wait for memory, there is | Alexander Bluhm | |
no other process which could free it. Better panic in malloc(9) or pool_get(9) instead of sleeping forever. tested by visa@ patrick@ Jan Klemkow suggested by kettenis@; OK deraadt@ | |||
2018-01-02 | Fix an off-by-one in the free(9) "passed size was too small" check: | Philip Guenther | |
if the size passed is exactly half the size of the bucket that the allocation was actually from, then it was incorrect. problem noted by florian@ ok florian@ visa@ | |||
2017-11-14 | remove MALLOC_DEBUG | David Gwynne | |
the code has rotted, and obviously hasnt been used for ages. it is also hard to make mpsafe. if we need something like this again it would be better to do it from scratch. ok tedu@ visa@ | |||
2017-07-10 | make malloc(9) mpsafe by using a mutex instead of splvm. | David Gwynne | |
this is almost a straightforward change of spl ops with mutex ops, except the accounting has been shuffled around. memory is counted as used before an attempt to allocate it from uvm is made to prevent overcommitting memory. this is modelled on how pools limit allocations. the uvm bits have been eyeballed by kettenis@ who says they should be safe. visa@ found some nits which have been fixed. tested by chris@ and amit kulkarni ok kettenis@ visa@ mpi@ | |||
2017-06-07 | Assert that the calling CPU is holding the KERNEL_LOCK() in malloc(9) | Martin Pieuchot | |
and free(9). The exception is at early boot when only one CPU is running since we grab the KERNL_LOCK() relatively late in main(). ok kettenis@ | |||
2015-03-14 | Remove some includes include-what-you-use claims don't | Jonathan Gray | |
have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@ | |||
2015-02-13 | Include sys/stdint.h for SIZE_MAX instead of relying on the misplaced | Todd C. Miller | |
define in sys/limits.h. OK guenther@ | |||
2014-12-10 | convert bcopy to memcpy. ok millert | Ted Unangst | |
2014-11-18 | move arc4random prototype to systm.h. more appropriate for most code | Ted Unangst | |
to include that than rdnvar.h. ok deraadt dlg | |||
2014-11-16 | Replace a plethora of historical protection options with just | Theo de Raadt | |
PROT_NONE, PROT_READ, PROT_WRITE, and PROT_EXEC from mman.h. PROT_MASK is introduced as the one true way of extracting those bits. Remove UVM_ADV_* wrapper, using the standard names. ok doug guenther kettenis | |||
2014-11-06 | need to calculate correct size before doing the free checks. the biggest | Ted Unangst | |
malloc bucket isn't precise, it can have anything in it. should fix recent panics. sorry for inconvenience. ok deraadt millert | |||
2014-11-06 | let ramdisks compile | Theo de Raadt | |
2014-11-05 | need to move lock up to prevent more than one malloc. ok guenther | Ted Unangst | |
2014-11-05 | don't use loop variable (i) for not loop things. use a new var. | Ted Unangst | |
2014-11-05 | use memname to print string of type. stolen from deraadt | Ted Unangst | |
2014-11-05 | also print type when free size is wrong | Ted Unangst | |
2014-11-02 | tweak free panic messages too | Ted Unangst | |
2014-11-02 | tweak panic messages for consistency | Ted Unangst | |
2014-09-14 | remove uneeded proc.h includes | Jonathan Gray | |
ok mpi@ kspillner@ | |||
2014-07-13 | if the freedsize isn't zero, check that's reasonable. ok beck | Ted Unangst | |
2014-07-12 | add a size argument to free. will be used soon, but for now default to 0. | Ted Unangst | |
after discussions with beck deraadt kettenis. | |||
2014-07-10 | instead of defining two versions of bucketidx, just don't inline for small. | Ted Unangst | |
ok deraadt | |||
2014-07-10 | Add mallocarray(9) | Matthew Dempsky | |
While here, change malloc(9)'s size argument from "unsigned long" to "size_t". ok tedu | |||
2014-07-10 | pool_debug still needed for non-DIAGNOSTIC kernels | Theo de Raadt | |
2014-07-10 | hide the biglock thrashing under pool_debug so it can be turned off | Ted Unangst | |
2014-06-21 | you've had 12+ years to update your kernel config. | Daniel Dickman | |
ok deraadt@ | |||
2014-05-19 | consistent use of uint32_t for poison values | Ted Unangst | |
2014-04-03 | if it's ok to wait, it must also be ok to give the kernel lock. do so. | Ted Unangst | |
(then immediately reacquire it). this has the effect of giving interrupts on other CPUs to a chance to run and reduces latency in many cases. ok deraadt | |||
2014-03-28 | Reduce uvm include madness. Use <uvm/uvm_extern.h> instead of | Martin Pieuchot | |
<uvm/uvm.h> if possible and remove double inclusions. ok beck@, mlarkin@, deraadt@ | |||
2014-01-21 | bzero -> memset | Ted Unangst | |
2013-08-08 | Uncomment kprintf format attributes for sys/kern | Sylvestre Gallon | |
tested on vax (gcc3) ok miod@ | |||
2013-07-04 | permit free(NULL) to work. ok deraadt | Ted Unangst | |
2013-05-31 | open up some races. if pool_debug == 2, force a yield() whenever waitok. | Ted Unangst | |
ok miod | |||
2013-05-03 | switch the malloc and pool freelists to using xor simpleq. | Ted Unangst | |
this adds a tiny bit more protection from list manipulation. | |||
2013-04-06 | shuffle around some poison code, prototypes, values... | Ted Unangst | |
allow some more pool debug code to be enabled if not compiled in bump poison size back up to 64 | |||
2013-03-28 | separate memory poisoning code to a new file and make it usable kernel wide | Ted Unangst | |
ok deraadt | |||
2013-03-26 | replace kern malloc's hand rolled freelist with simpleq macros. | Ted Unangst | |
ok deraadt mpi |