aboutsummaryrefslogtreecommitdiffstats
path: root/src/ralloc.c
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright for years from Emacs 21 to present (mainly addingGlenn Morris2007-01-141-2/+2
| | | | 2001).
* * ralloc.c (relinquish): Use a long for excess space counter toChong Yidong2006-10-291-1/+1
| | | | handle 64-bit case correctly.
* Update years in copyright notice; nfc.Thien-Thi Nguyen2006-02-061-1/+1
|
* Update years in copyright notice; nfc.Thien-Thi Nguyen2005-08-071-1/+2
|
* Update FSF's address.Lute Kamstra2005-07-041-2/+2
|
* #include blockinput alsoJan Djärv2005-04-021-0/+1
|
* * alloc.c (allocate_string_data): Call BLOCK_INPUT before callingJan Djärv2005-04-021-1/+3
| | | | | | mallopt. * ralloc.c (r_alloc_init): Ditto.
* Add arch taglinesMiles Bader2003-09-011-0/+3
|
* Trailing whitespace deleted.Juanma Barranquero2003-02-041-33/+33
|
* (__morecore) [!SYSTEM_MALLOC]: Move declarationGerd Moellmann2001-02-191-8/+8
| | | | to the start of the file.
* (__malloc_extra_blocks): Declare as __malloc_size_t.Dave Love2000-09-251-1/+1
|
* Remove everything having to do with the use of mmap.Gerd Moellmann2000-09-141-430/+0
|
* (mmap_enlarge): Don't return 0 if successful.Gerd Moellmann2000-09-101-16/+14
|
* (mmap_fd): Remove initializer which can make itGerd Moellmann2000-09-081-44/+35
| | | | | | | | | | | | read-only in a dumped Emacs. (mmap_fd_1): New variable. (mmap_set_vars): Remove local `fd'. Save mmap_fd in mmap_fd_1, restore it from there. (r_alloc, r_re_alloc, r_alloc_free): Call r_alloc_init unconditionally so that mmap_fd can be initialized there. (r_alloc_init_fd): Open-coded in r_alloc_init; function removed. (r_alloc_init) [REL_ALLOC_MMAP && !MAP_ANON]: Open /dev/zero. (r_alloc_init) [REL_ALLOC_MMAP && MAP_ANON]: Set mmap_fd to -1.
* (r_alloc_init_fd): Move. Fix conditional for pcc.Dave Love2000-09-081-12/+16
|
* (r_alloc_init): Conditionalize on SYSTEM_MALLOC, not REL_ALLOC_MMAP.Dave Love2000-09-081-3/+1
|
* (r_alloc_init_fd): Conditionalize on MAP_ANON.Dave Love2000-09-081-0/+2
|
* Don't include string.h (redundant).Dave Love2000-09-081-5/+57
| | | | | | | | | | | | (MAP_ANON) [REL_ALLOC_MMAP]: Ensure it's defined. [!MAP_ANON]: Include fcntl.h. (mmap_fd) [REL_ALLOC_MMAP]: New variable. (r_alloc, r_re_alloc, r_alloc_free) (mmap_enlarge, mmap_set_vars): Use it. (r_alloc_init_fd): New function. (__morecore) [SYSTEM_MALLOC]: Don't declare. (r_alloc_init): Call r_alloc_init_fd. Conditionalize stuff on malloc type.
* (obtain, relinquish, relinquish, r_alloc_size_in_use)Gerd Moellmann2000-09-071-20/+21
| | | | | | (get_bloc, relocate_blocs, update_heap_bloc_correspondence) (resize_bloc, r_alloc_sbrk, r_alloc_init): Add casts to `char *' where necessary, in case POINTER_TYPE is `void'.
* (mmap_find): Fix overlap computation.Gerd Moellmann2000-09-071-8/+14
| | | | | (mmap_enlarge): Compute nbytes before trying to find an overlapping region.
* (POINTER, SIZE) [emacs]: Define in terms ofGerd Moellmann2000-09-061-80/+472
| | | | | | | | | | | POINTER_TYPE and size_t. (struct mmap_region) [REL_ALLOC_MMAP]: New structure. (mmap_regions, mmap_regions_1) [REL_ALLOC_MMAP]: New variables. (ROUND, MMAP_REGION_STRUCT_SIZE, MMAP_REGION, MMAP_USER_AREA) [REL_ALLOC_MMAP]: New macros. (mmap_find, mmap_free, mmap_enlarge, mmap_set_vars) (mmap_mapped_bytes, r_alloc, r_re_alloc, r_alloc_free) [REL_ALLOC_MMAP]: New functions.
* Make real_morecore non-static.Andrew Innes2000-07-051-1/+1
|
* Maybe include unistd.h.Dave Love2000-06-231-1/+3
|
* (relinquish): When returning memory to the system,Karl Heuer1997-09-271-1/+12
| | | | watch out for the original data segment boundary.
* (r_alloc_reinit): New function.Richard M. Stallman1997-07-121-0/+18
|
* (mallopt): Declare, if appropriate.Richard M. Stallman1997-05-161-0/+9
| | | | | (r_alloc_init) [DOUG_LEA_MALLOC]: Call mallopt, instead of setting __malloc_extra_blocks.
* (r_alloc_check): Don't check alignment of h->start.Richard M. Stallman1996-04-071-0/+4
|
* Update FSF's address in the preamble.Erik Naggum1996-01-151-1/+2
|
* Comment fixes.Karl Heuer1996-01-051-8/+8
|
* (r_re_alloc): Correct realloc behavior--allow shrinkingRichard M. Stallman1995-03-281-26/+140
| | | | | | | | | | of blocks while reallocating, if shrinking by more than one page. (relocate_blocs, resize_blocs): Added failsafe to protect future calling of these routines when in frozen state. (r_alloc_thaw): Added call to r_alloc_init. (relocate_blocks, resize_bloc, r_alloc_sbrk, r_alloc_thaw): Extended functionality to let ralloc package work in frozen state, allowing for the existence of unused blocks.
* (r_alloc_init): Set __malloc_extra_blocks.Richard M. Stallman1995-02-191-0/+6
|
* (r_alloc_check): Return void.Richard M. Stallman1995-02-161-1/+13
| | | | | (r_alloc_freeze): Initialize if it hasn't been done. (r_re_alloc, r_alloc_free, r_alloc_sbrk): Likewise.
* Whitespace fixes.Richard M. Stallman1995-02-161-79/+79
|
* (r_alloc_free): Call refill_memory_reserve only if emacs.Richard M. Stallman1995-02-141-6/+9
| | | | | | Include getpagesize.h unconditionally. (free_bloc): Don't die if bloc->next or bloc->prev is null. [!emacs] (bzero): New macro definition.
* (r_alloc_size_in_use): New function.Richard M. Stallman1995-02-071-0/+11
| | | | (r_alloc_free): Call refill_memory_reserve.
* (r_alloc_init): Remove unused variable END.Roland McGrath1995-01-151-4/+2
|
* (struct heap): New fields first_bloc, last_bloc.Richard M. Stallman1994-10-231-16/+114
| | | | | | | | | (struct bp): New field heap. (get_bloc, free_bloc, obtain, r_alloc_sbrk): Update new fields. (reorder_bloc): New function. (update_heap_bloc_correspondence): Renamed from update_heap_free_pointers. Update new fields. (relinquish): Add error check for new fields.
* (heap_base): Move static var to top level.Richard M. Stallman1994-10-181-81/+208
| | | | | | | | | (struct heap): New slot `free'. (obtain): Set `free' for new heap. (get_bloc): Update `free'. (find_heap): New function. (update_heap_free_pointers): New function. (resize_bloc, r_alloc_sbrk): Call update_heap_free_pointers.
* Install Hiroshi Nakano's rewrite to allow multiple heaps, for implementationsKarl Heuer1994-10-121-142/+449
| | | | where the C library makes calls to sbrk directly.
* (r_alloc_freeze_level): New variable.Karl Heuer1994-09-201-2/+30
| | | | | (r_alloc_freeze, r_alloc_thaw): New functions. (r_alloc_sbrk): Refuse to move blocs, if frozen.
* (r_alloc_init): Explicitly use real_morecoreRichard M. Stallman1993-11-181-0/+12
| | | | to allocate the entire incomplete page.
* Include <config.h> instead of "config.h".Roland McGrath1993-09-101-1/+1
|
* (ALIGNED, ROUNDUP): Use `unsigned long int' instead of `unsigned int' forRoland McGrath1993-07-221-2/+3
| | | | casting addresses and sizes. It matters on the 64-bit Alpha.
* Apply typo patches from Paul Eggert.Jim Blandy1993-06-091-2/+2
|
* (r_alloc_sbrk): Declare already_available as long, not SIZE.Richard M. Stallman1993-05-261-1/+4
|
* (POINTER): Always use char *.Richard M. Stallman1993-05-261-0/+5
|
* Updated copyright years.Jim Blandy1993-05-221-1/+1
|
* [! emacs] [HAVE_CONFIG_H]: #include "config.h"Roland McGrath1992-12-291-0/+6
|
* * ralloc.c (relocate_some_blocs): Handle BLOC == NIL_BLOC.Jim Blandy1992-11-161-21/+23
| | | | | | | | (free_bloc): This can now be simplified. * ralloc.c (r_alloc_sbrk): When we allocate new space for the malloc heap, zero it out even if we don't have any blocs in the free list.
* (relinquish): Adjust page_break_value by amount of memory actually given back.Richard M. Stallman1992-10-241-14/+46
| | | | | | | | | | (r_alloc_sbrk): Provide hysteresis in relocating the blocs. (relinquish): Never free less than extra_bytes; keep extra_bytes of empty space. (obtain): Always get extra_bytes additional space. (r_alloc_init): Set extra_bytes and page_size. (ALIGNED, ROUNDUP, ROUND_TO_PAGE): Use page_size.