Upgrade Boehm GC to 7.2alpha4.
[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
15 #include "private/gc_priv.h"
16
17 #if defined(MANUAL_VDB)
18
19   /* Stubborn object (hard to change, nearly immutable) allocation.     */
20   /* This interface is deprecated.  We mostly emulate it using          */
21   /* MANUAL_VDB.  But that imposes the additional constraint that       */
22   /* written, but not yet GC_dirty()ed objects must be referenced       */
23   /* by a stack.                                                        */
24
25   GC_API void * GC_CALL GC_malloc_stubborn(size_t lb)
26   {
27     return(GC_malloc(lb));
28   }
29
30   GC_API void GC_CALL GC_end_stubborn_change(void *p)
31   {
32     GC_dirty(p);
33   }
34
35   /*ARGSUSED*/
36   GC_API void GC_CALL GC_change_stubborn(void *p)
37   {
38   }
39
40 #else /* !MANUAL_VDB */
41
42   GC_API void * GC_CALL GC_malloc_stubborn(size_t lb)
43   {
44     return(GC_malloc(lb));
45   }
46
47   /*ARGSUSED*/
48   GC_API void GC_CALL GC_end_stubborn_change(void *p)
49   {
50   }
51
52   /*ARGSUSED*/
53   GC_API void GC_CALL GC_change_stubborn(void *p)
54   {
55   }
56
57 #endif /* !MANUAL_VDB */