| 1 |
/* |
| 2 |
* Copyright (c) 1996-1998 by Silicon Graphics. All rights reserved. |
| 3 |
* Copyright (c) 2018-2021 Ivan Maidanski |
| 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 |
/* This file is kept for a binary compatibility purpose only. */ |
| 16 |
|
| 17 |
#ifndef GC_ALLOC_PTRS_H |
| 18 |
#define GC_ALLOC_PTRS_H |
| 19 |
|
| 20 |
#include "gc.h" |
| 21 |
|
| 22 |
#ifdef __cplusplus |
| 23 |
extern "C" { |
| 24 |
#endif |
| 25 |
|
| 26 |
#ifndef GC_API_PRIV |
| 27 |
# define GC_API_PRIV GC_API |
| 28 |
#endif |
| 29 |
|
| 30 |
/* Some compilers do not accept "const" together with the dllimport */ |
| 31 |
/* attribute, so the symbols below are exported as non-constant ones. */ |
| 32 |
#ifndef GC_APIVAR_CONST |
| 33 |
# if defined(GC_BUILD) || !defined(GC_DLL) |
| 34 |
# define GC_APIVAR_CONST const |
| 35 |
# else |
| 36 |
# define GC_APIVAR_CONST /* empty */ |
| 37 |
# endif |
| 38 |
#endif |
| 39 |
|
| 40 |
GC_API_PRIV void ** GC_APIVAR_CONST GC_objfreelist_ptr; |
| 41 |
GC_API_PRIV void ** GC_APIVAR_CONST GC_aobjfreelist_ptr; |
| 42 |
GC_API_PRIV void ** GC_APIVAR_CONST GC_uobjfreelist_ptr; |
| 43 |
|
| 44 |
#ifdef GC_ATOMIC_UNCOLLECTABLE |
| 45 |
GC_API_PRIV void ** GC_APIVAR_CONST GC_auobjfreelist_ptr; |
| 46 |
#endif |
| 47 |
|
| 48 |
/* Manually update the number of bytes allocated during the current */ |
| 49 |
/* collection cycle and the number of explicitly deallocated bytes of */ |
| 50 |
/* memory since the last collection, respectively. Both functions are */ |
| 51 |
/* unsynchronized, GC_call_with_alloc_lock() should be used to avoid */ |
| 52 |
/* data races. */ |
| 53 |
GC_API_PRIV void GC_CALL GC_incr_bytes_allocd(size_t /* bytes */); |
| 54 |
GC_API_PRIV void GC_CALL GC_incr_bytes_freed(size_t /* bytes */); |
| 55 |
|
| 56 |
#ifdef __cplusplus |
| 57 |
} /* extern "C" */ |
| 58 |
#endif |
| 59 |
|
| 60 |
#endif /* GC_ALLOC_PTRS_H */ |