2 * Copyright (C) 2008 The Android Open Source Project
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 #ifndef _DALVIK_ALLOC_MARK_SWEEP
17 #define _DALVIK_ALLOC_MARK_SWEEP
19 #include "alloc/HeapBitmap.h"
20 #include "alloc/HeapSource.h"
23 /* Highest address (exclusive)
27 /* Current top of the stack (exclusive)
31 /* Lowest address (inclusive)
35 /* Maximum stack size, in bytes.
40 /* This is declared publicly so that it can be included in gDvm.gcHeap.
45 const char *immuneLimit;
46 const void *finger; // only used while scanning/recursing.
49 bool dvmHeapBeginMarkStep(bool isPartial);
50 void dvmHeapMarkRootSet(void);
51 void dvmHeapReMarkRootSet(void);
52 void dvmHeapScanMarkedObjects(void);
53 void dvmHeapReScanMarkedObjects(void);
54 void dvmHeapProcessReferences(Object **softReferences, bool clearSoftRefs,
55 Object **weakReferences,
56 Object **phantomReferences);
57 void dvmHeapFinishMarkStep(void);
58 void dvmHeapSweepSystemWeaks(void);
59 void dvmHeapSweepUnmarkedObjects(bool isPartial, bool isConcurrent,
60 size_t *numObjects, size_t *numBytes);
62 #endif // _DALVIK_ALLOC_MARK_SWEEP