Pristine Ack-5.5
[Ack-5.5.git] / lang / cem / libcc.ansi / stdlib / malloc / log.h
1 /* $Id: log.h,v 1.2 1994/06/24 11:55:26 ceriel Exp $ */
2 /*
3  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
4  * See the copyright notice in the ACK home directory, in the file "Copyright".
5  */
6 /*      Algorithms to manipulate the doubly-linked lists of free
7         chunks.
8 */
9
10 public link_free_chunk(mallink *ml), unlink_free_chunk(mallink *ml);
11 public mallink *first_present(int class);
12 public mallink *search_free_list(int class, size_t n);
13
14 #ifdef STORE
15 #define in_store(ml)            ((size_type)_phys_prev_of(ml) & STORE_BIT)
16 #define set_store(ml, e) \
17         (_phys_prev_of(ml) = (mallink *) \
18                 ((e) ? (size_type) _phys_prev_of(ml) | STORE_BIT : \
19                        (size_type) _phys_prev_of(ml) & ~STORE_BIT))
20 #endif
21 #define set_log_prev(ml,e)      (_log_prev_of(ml) = (e))
22 #define log_prev_of(ml)         (mallink *) (_log_prev_of(ml))
23
24 #define set_log_next(ml,e)      (_log_next_of(ml) = (e))
25 #define log_next_of(ml)         (mallink *) (_log_next_of(ml))
26