freebsd-7 memóriakezelés [megoldva]
Bajlódom egy programmal, amit FreeBSD-7.0-ra akarok portolni. A program fut Windowson, mindenféle Linuxon, mindenféle Solarison és FreeBSD-6.3-on. 7.0-án viszont nem.
Ilyen hibákat kapok:
realloc 0-t ad,
malloc 0-t ad,
malloc olyan pointer ad, ami egy másik létező buffer címe,
free sigsegv-zik olyan pointerrel, amit pár sorral előbb adott a malloc.
Látom a relnotesban, hogy 6 és 7 között változott a malloc:
A new malloc(3) implementation has been introduced. This implementation, sometimes referred to as “jemalloc”, was designed to improve the performance of multi-threaded programs, particularly on SMP systems, while preserving the performance of single-threaded programs. Due to the use of different algorithms and data structures, jemalloc may expose some previously-unknown bugs in userland code, although most of the FreeBSD base system and common ports have been tested and/or fixed. Note that jemalloc uses mmap(2) to obtain memory and only uses sbrk(2) under limited circumstances (and then only for 32-bit architectures). As a result, the datasize resource limit has little practical effect for typical applications. The vmemoryuse resource limit, however, can be used to bound the total virtual memory used by a process, as described in limits(1).
Sajnos ez nem visz közelebb a megoldáshoz. Ha esetleg valaki találkozott ilyen problémával ...
- Tovább (freebsd-7 memóriakezelés [megoldva])
- 1305 megtekintés