aboutsummaryrefslogtreecommitdiffstats
path: root/src/ralloc.c
Commit message (Collapse)AuthorAgeFilesLines
* (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.
* [emacs]: Define POINTER and SIZE.Richard M. Stallman1992-10-201-2/+11
| | | | [!emacs]: Delete definition of EXCEEDS_LISP_PTR.
* Removed #include "mem-limits.h".Roland McGrath1992-10-121-7/+15
| | | | | | [emacs]: Moved #undef NULL and #include "getpagesize.h" here. [! emacs]: #include <unistd.h>, <malloc.h>, <string.h>. (r_alloc_init): Use NIL, not NULL.
* (sbrk): Removed decl.Roland McGrath1992-10-121-98/+9
| | | | | | | | | | | (real_morecore): New static variable. (warnlevel, warn_function, check_memory_limits): Removed. (obtain): Don't call check_memory_limits. (obtain, relinquish, r_alloc_sbrk): Use (*real_morecore) in place of sbrk; it returns 0 for errors, not -1. (r_alloc_init): Set real_morecore to old value of __morecore. Don't initialize lim_data or warnlevel, and don't call get_lim_data. (memory_warnings): Function removed.
* mem_limits.h is now called mem-limits.h.Roland McGrath1992-10-121-1/+1
|
* (check_memory_limits): Reduce warnlevel when usage drops far enough.Richard M. Stallman1992-10-111-32/+77
| | | | | | | | | | | | | | | | | | (memory_warnings): New function; just set warning data. Use start_of_data if start is 0. [!emacs]: Don't include config.h or lisp.h; instead, use stddef.h. Define POINTER, SIZE, EXCEEDS_LISP_PTR. [!emacs] (safe_bcopy): Define as macro using memmove. (r_alloc_free): Clear *ptr. (r_alloc_init): Renamed from malloc_init. Take no args. Make it static; declare at top of file. (r_alloc): Call r_alloc_init, if not initialized yet. (r_alloc_initialized): Renamed from malloc_initialized; moved to top. (ROUNDUP): Subtract 1, in case arg is already aligned. (check_memory_limits): EXCEEDS_LISP_PTR renamed from EXCEEDS_ELISP_PTR.
* * ralloc.c: Since the users of the relocating allocation codeJim Blandy1992-09-291-29/+64
| | | | | | | | | | | | | | | | handle memory exhaustion, it's better to return an error code to them than to call abort. (obtain): If we cannot allocate more memory, don't call abort. Instead, return non-zero iff the allocation is successful. (get_more_space): If obtain fails, return zero. (get_bloc): Return zero if we can't allocate the new bloc. (r_alloc_sbrk): Return zero if we can't allocate more memory. (r_alloc): If we can't allocate more memory, set *PTR to zero and return zero. (r_re_alloc): If we can't allocate more memory, leave *PTR unchanged, and return zero. * ralloc.c (warnfunction): Renamed to warn_function; users changed.
* Fix typo.Jim Blandy1992-09-131-1/+1
|
* * ralloc.c (r_re_alloc): Instead of allocating a new bloc at theJim Blandy1992-09-091-13/+15
| | | | | | | | end of the heap, copying the data to it, and then freeing the original bloc, just expand the original block. This saves a copy and a call to sbrk, and also removes the large spike in memory allocation that would occur when resizing large buffers. And it's less code.
* * ralloc.c (get_bloc): When initializing new_bloc->variable, castJim Blandy1992-08-191-1/+5
| | | | | | NIL to (POINTER *). (malloc_init): Give warning if sbrk returns zero. Wonder what that's supposed to mean.
* entered into RCSJoseph Arceneaux1992-06-301-1/+0
|
* *** empty log message ***Jim Blandy1992-04-241-0/+1
|
* *** empty log message ***Jim Blandy1992-03-141-21/+45
|
* *** empty log message ***Jim Blandy1992-01-131-1/+1
|
* Initial revisionJim Blandy1990-11-121-0/+426