aeaf3cc7a6aecae01fa87208ea3a3d7d8223136c
[cacao.git] / src / mm / boehm-gc / stubborn.c
1 /* 
2  * Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
3  * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
4  *
5  * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
6  * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
7  *
8  * Permission is hereby granted to use or copy this program
9  * for any purpose,  provided the above notices are retained on all copies.
10  * Permission to modify the code and to distribute modified code is granted,
11  * provided the above notices are retained, and a notice that the code was
12  * modified is included with the above copyright notice.
13  */
14 /* Boehm, July 31, 1995 5:02 pm PDT */
15
16 #include "config.h"
17
18 #include "private/gc_priv.h"
19
20 #if defined(MANUAL_VDB)
21 /* Stubborn object (hard to change, nearly immutable) allocation. */
22 /* This interface is deprecated.  We mostly emulate it using      */
23 /* MANUAL_VDB.  But that imposes the additional constraint that   */
24 /* written, but not yet GC_dirty()ed objects must be referenced   */
25 /* by a stack.                                                    */
26 void * GC_malloc_stubborn(size_t lb)
27 {
28     return(GC_malloc(lb));
29 }
30
31 /*ARGSUSED*/
32 void GC_end_stubborn_change(void *p)
33 {
34     GC_dirty(p);
35 }
36
37 /*ARGSUSED*/
38 void GC_change_stubborn(void *p)
39 {
40 }
41
42 #else /* !MANUAL_VDB */
43
44 void * GC_malloc_stubborn(size_t lb)
45 {
46     return(GC_malloc(lb));
47 }
48
49 /*ARGSUSED*/
50 void GC_end_stubborn_change(void *p)
51 {
52 }
53
54 /*ARGSUSED*/
55 void GC_change_stubborn(void *p)
56 {
57 }
58
59 #endif /* !MANUAL_VDB */