summaryrefslogtreecommitdiffstats
path: root/vm/alloc
diff options
context:
space:
mode:
Diffstat (limited to 'vm/alloc')
-rw-r--r--vm/alloc/Alloc.cpp16
-rw-r--r--vm/alloc/CardTable.cpp4
-rw-r--r--vm/alloc/Copying.cpp54
-rw-r--r--vm/alloc/Heap.cpp10
-rw-r--r--vm/alloc/HeapSource.cpp20
-rw-r--r--vm/alloc/MarkSweep.cpp8
-rw-r--r--vm/alloc/Verify.cpp2
7 files changed, 57 insertions, 57 deletions
diff --git a/vm/alloc/Alloc.cpp b/vm/alloc/Alloc.cpp
index f3782612c..152951053 100644
--- a/vm/alloc/Alloc.cpp
+++ b/vm/alloc/Alloc.cpp
@@ -27,7 +27,7 @@
* We're currently using a memory-mapped arena to keep things off of the
* main heap. This needs to be replaced with something real.
*/
-bool dvmGcStartup(void)
+bool dvmGcStartup()
{
dvmInitMutex(&gDvm.gcHeapLock);
@@ -38,7 +38,7 @@ bool dvmGcStartup(void)
* Post-zygote heap initialization, including starting
* the HeapWorker thread.
*/
-bool dvmGcStartupAfterZygote(void)
+bool dvmGcStartupAfterZygote()
{
return dvmHeapStartupAfterZygote();
}
@@ -46,7 +46,7 @@ bool dvmGcStartupAfterZygote(void)
/*
* Shutdown the threads internal to the garbage collector.
*/
-void dvmGcThreadShutdown(void)
+void dvmGcThreadShutdown()
{
dvmHeapThreadShutdown();
}
@@ -54,7 +54,7 @@ void dvmGcThreadShutdown(void)
/*
* Shut the GC down.
*/
-void dvmGcShutdown(void)
+void dvmGcShutdown()
{
//TODO: grab and destroy the lock
dvmHeapShutdown();
@@ -63,12 +63,12 @@ void dvmGcShutdown(void)
/*
* Do any last-minute preparation before we call fork() for the first time.
*/
-bool dvmGcPreZygoteFork(void)
+bool dvmGcPreZygoteFork()
{
return dvmHeapSourceStartupBeforeFork();
}
-bool dvmGcStartupClasses(void)
+bool dvmGcStartupClasses()
{
{
const char *klassName = "Ljava/lang/ref/ReferenceQueueThread;";
@@ -166,7 +166,7 @@ static Object* createStockException(const char* descriptor, const char* msg)
* We can't do this during the initial startup because we need to execute
* the constructors.
*/
-bool dvmCreateStockExceptions(void)
+bool dvmCreateStockExceptions()
{
/*
* Pre-allocate some throwables. These need to be explicitly added
@@ -318,7 +318,7 @@ void dvmReleaseTrackedAlloc(Object* obj, Thread* self)
/*
* Explicitly initiate garbage collection.
*/
-void dvmCollectGarbage(void)
+void dvmCollectGarbage()
{
if (gDvm.disableExplicitGc) {
return;
diff --git a/vm/alloc/CardTable.cpp b/vm/alloc/CardTable.cpp
index d29bfa58b..646a59505 100644
--- a/vm/alloc/CardTable.cpp
+++ b/vm/alloc/CardTable.cpp
@@ -167,7 +167,7 @@ static void moveCardsToModUnion(u1 *base, u1 *limit)
}
}
-void dvmClearCardTable(void)
+void dvmClearCardTable()
{
uintptr_t base[HEAP_SOURCE_MAX_HEAP_COUNT];
uintptr_t limit[HEAP_SOURCE_MAX_HEAP_COUNT];
@@ -423,7 +423,7 @@ static void verifyCardTableCallback(void *ptr, void *arg)
/*
* Verifies that gray objects are on a dirty card.
*/
-void dvmVerifyCardTable(void)
+void dvmVerifyCardTable()
{
HeapBitmap *markBits = gDvm.gcHeap->markContext.bitmap;
dvmHeapBitmapWalk(markBits, verifyCardTableCallback, markBits);
diff --git a/vm/alloc/Copying.cpp b/vm/alloc/Copying.cpp
index 7385298a7..fca8ae70a 100644
--- a/vm/alloc/Copying.cpp
+++ b/vm/alloc/Copying.cpp
@@ -147,7 +147,7 @@ static bool fromSpaceContains(const void *addr);
static size_t sumHeapBitmap(const HeapBitmap *bitmap);
static size_t objectSize(const Object *obj);
static void scavengeDataObject(Object *obj);
-static void scavengeBlockQueue(void);
+static void scavengeBlockQueue();
/*
* We use 512-byte blocks.
@@ -502,12 +502,12 @@ GcHeap *dvmHeapSourceStartup(size_t startSize, size_t absoluteMaxSize)
* zygote process. This is a no-op for the time being. Eventually
* this will demarcate the shared region of the heap.
*/
-bool dvmHeapSourceStartupAfterZygote(void)
+bool dvmHeapSourceStartupAfterZygote()
{
return true;
}
-bool dvmHeapSourceStartupBeforeFork(void)
+bool dvmHeapSourceStartupBeforeFork()
{
assert(!"implemented");
return false;
@@ -568,7 +568,7 @@ void dvmHeapSourceGetObjectBitmaps(HeapBitmap objBits[], HeapBitmap markBits[],
assert(!"implemented");
}
-HeapBitmap *dvmHeapSourceGetLiveBits(void)
+HeapBitmap *dvmHeapSourceGetLiveBits()
{
return &gDvm.gcHeap->heapSource->allocBits;
}
@@ -697,7 +697,7 @@ size_t dvmHeapSourceChunkSize(const void *ptr)
return 0;
}
-size_t dvmHeapSourceFootprint(void)
+size_t dvmHeapSourceFootprint()
{
assert(!"implemented");
return 0;
@@ -708,12 +708,12 @@ size_t dvmHeapSourceFootprint(void)
* bytes currently committed to the heap. This starts out at the
* start size of the heap and grows toward the maximum size.
*/
-size_t dvmHeapSourceGetIdealFootprint(void)
+size_t dvmHeapSourceGetIdealFootprint()
{
return gDvm.gcHeap->heapSource->currentSize;
}
-float dvmGetTargetHeapUtilization(void)
+float dvmGetTargetHeapUtilization()
{
return 0.5f;
}
@@ -729,7 +729,7 @@ void dvmSetTargetHeapUtilization(float newTarget)
* just a no-op. Eventually, we will either allocate or commit pages
* on an as-need basis.
*/
-void dvmHeapSourceGrowForUtilization(void)
+void dvmHeapSourceGrowForUtilization()
{
/* do nothing */
}
@@ -747,7 +747,7 @@ void dvmHeapSourceWalk(void (*callback)(const void *chunkptr, size_t chunklen,
assert(!"implemented");
}
-size_t dvmHeapSourceGetNumHeaps(void)
+size_t dvmHeapSourceGetNumHeaps()
{
return 1;
}
@@ -763,13 +763,13 @@ void dvmTrackExternalFree(size_t n)
/* do nothing */
}
-size_t dvmGetExternalBytesAllocated(void)
+size_t dvmGetExternalBytesAllocated()
{
assert(!"implemented");
return 0;
}
-void dvmHeapSourceFlip(void)
+void dvmHeapSourceFlip()
{
HeapSource *heapSource = gDvm.gcHeap->heapSource;
@@ -1112,7 +1112,7 @@ void preserveSoftReferences(Object **list)
scavengeBlockQueue();
}
-void processFinalizableReferences(void)
+void processFinalizableReferences()
{
HeapRefTable newPendingRefs;
LargeHeapRefTable *finRefs = gDvm.gcHeap->finalizableRefs;
@@ -1431,7 +1431,7 @@ static void pinHashTableEntries(HashTable *table)
LOG_PIN("<<< pinHashTableEntries(table=%p)", table);
}
-static void pinPrimitiveClasses(void)
+static void pinPrimitiveClasses()
{
size_t length = ARRAYSIZE(gDvm.primitiveClass);
for (size_t i = 0; i < length; i++) {
@@ -1446,7 +1446,7 @@ static void pinPrimitiveClasses(void)
* been pinned and are therefore ignored. Non-permanent strings that
* have been forwarded are snapped. All other entries are removed.
*/
-static void scavengeInternedStrings(void)
+static void scavengeInternedStrings()
{
HashTable *table = gDvm.internedStrings;
if (table == NULL) {
@@ -1469,7 +1469,7 @@ static void scavengeInternedStrings(void)
dvmHashTableUnlock(table);
}
-static void pinInternedStrings(void)
+static void pinInternedStrings()
{
HashTable *table = gDvm.internedStrings;
if (table == NULL) {
@@ -1730,7 +1730,7 @@ static void scavengeThread(Thread *thread)
scavengeThreadStack(thread);
}
-static void scavengeThreadList(void)
+static void scavengeThreadList()
{
Thread *thread;
@@ -1865,7 +1865,7 @@ static void pinThread(const Thread *thread)
}
}
-static void pinThreadList(void)
+static void pinThreadList()
{
Thread *thread;
@@ -2009,7 +2009,7 @@ static void describeBlockQueue(const HeapSource *heapSource)
/*
* Blackens promoted objects.
*/
-static void scavengeBlockQueue(void)
+static void scavengeBlockQueue()
{
HeapSource *heapSource;
size_t block;
@@ -2032,7 +2032,7 @@ static void scavengeBlockQueue(void)
* in new space. This should be parametrized so we can invoke this
* routine outside of the context of a collection.
*/
-static void verifyNewSpace(void)
+static void verifyNewSpace()
{
HeapSource *heapSource = gDvm.gcHeap->heapSource;
size_t c0 = 0, c1 = 0, c2 = 0, c7 = 0;
@@ -2056,7 +2056,7 @@ static void verifyNewSpace(void)
}
}
-void describeHeap(void)
+void describeHeap()
{
HeapSource *heapSource = gDvm.gcHeap->heapSource;
describeBlocks(heapSource);
@@ -2070,7 +2070,7 @@ void describeHeap(void)
* registers and various globals. Lastly, a verification of the heap
* is performed. The last phase should be optional.
*/
-void dvmScavengeRoots(void) /* Needs a new name badly */
+void dvmScavengeRoots() /* Needs a new name badly */
{
GcHeap *gcHeap;
@@ -2206,22 +2206,22 @@ bool dvmHeapBeginMarkStep(GcMode mode)
return true;
}
-void dvmHeapFinishMarkStep(void)
+void dvmHeapFinishMarkStep()
{
/* do nothing */
}
-void dvmHeapMarkRootSet(void)
+void dvmHeapMarkRootSet()
{
/* do nothing */
}
-void dvmHeapScanMarkedObjects(void)
+void dvmHeapScanMarkedObjects()
{
dvmScavengeRoots();
}
-void dvmHeapScheduleFinalizations(void)
+void dvmHeapScheduleFinalizations()
{
/* do nothing */
}
@@ -2233,12 +2233,12 @@ void dvmHeapSweepUnmarkedObjects(GcMode mode, int *numFreed, size_t *sizeFreed)
/* do nothing */
}
-void dvmMarkDirtyObjects(void)
+void dvmMarkDirtyObjects()
{
assert(!"implemented");
}
-void dvmHeapSourceThreadShutdown(void)
+void dvmHeapSourceThreadShutdown()
{
/* do nothing */
}
diff --git a/vm/alloc/Heap.cpp b/vm/alloc/Heap.cpp
index c8b634126..34f56cc3b 100644
--- a/vm/alloc/Heap.cpp
+++ b/vm/alloc/Heap.cpp
@@ -108,7 +108,7 @@ bool dvmHeapStartup()
return true;
}
-bool dvmHeapStartupAfterZygote(void)
+bool dvmHeapStartupAfterZygote()
{
return dvmHeapSourceStartupAfterZygote();
}
@@ -129,7 +129,7 @@ void dvmHeapShutdown()
/*
* Shutdown any threads internal to the heap.
*/
-void dvmHeapThreadShutdown(void)
+void dvmHeapThreadShutdown()
{
dvmHeapSourceThreadShutdown();
}
@@ -436,7 +436,7 @@ size_t dvmObjectSizeInHeap(const Object *obj)
return dvmHeapSourceChunkSize(obj);
}
-static void verifyRootsAndHeap(void)
+static void verifyRootsAndHeap()
{
dvmVerifyRoots();
dvmVerifyBitmap(dvmHeapSourceGetLiveBits());
@@ -447,7 +447,7 @@ static void verifyRootsAndHeap(void)
* original priority if successful. Otherwise, returns INT_MAX on
* failure.
*/
-static int raiseThreadPriority(void)
+static int raiseThreadPriority()
{
/* Get the priority (the "nice" value) of the current thread. The
* getpriority() call can legitimately return -1, so we have to
@@ -773,7 +773,7 @@ void dvmCollectGarbageInternal(const GcSpec* spec)
* suspend when the GC thread calls dvmUnlockHeap before dvmResumeAllThreads,
* but there's no risk of deadlock.)
*/
-void dvmWaitForConcurrentGcToComplete(void)
+void dvmWaitForConcurrentGcToComplete()
{
Thread *self = dvmThreadSelf();
assert(self != NULL);
diff --git a/vm/alloc/HeapSource.cpp b/vm/alloc/HeapSource.cpp
index 0f47fbae2..9e12b58b1 100644
--- a/vm/alloc/HeapSource.cpp
+++ b/vm/alloc/HeapSource.cpp
@@ -32,7 +32,7 @@
extern "C" int dlmalloc_trim(size_t);
extern "C" void dlmalloc_walk_free_pages(void(*)(void*, void*, void*), void*);
-static void snapIdealFootprint(void);
+static void snapIdealFootprint();
static void setIdealFootprint(size_t max);
static size_t getMaximumSize(const HeapSource *hs);
@@ -426,7 +426,7 @@ static void *gcDaemonThread(void* arg)
return NULL;
}
-static bool gcDaemonStartup(void)
+static bool gcDaemonStartup()
{
dvmInitMutex(&gHs->gcThreadMutex);
pthread_cond_init(&gHs->gcThreadCond, NULL);
@@ -436,7 +436,7 @@ static bool gcDaemonStartup(void)
return gHs->hasGcThread;
}
-static void gcDaemonShutdown(void)
+static void gcDaemonShutdown()
{
if (gHs->hasGcThread) {
dvmLockMutex(&gHs->gcThreadMutex);
@@ -575,7 +575,7 @@ fail:
return NULL;
}
-bool dvmHeapSourceStartupAfterZygote(void)
+bool dvmHeapSourceStartupAfterZygote()
{
return gDvm.concurrentMarkSweep ? gcDaemonStartup() : true;
}
@@ -608,7 +608,7 @@ dvmHeapSourceStartupBeforeFork()
return true;
}
-void dvmHeapSourceThreadShutdown(void)
+void dvmHeapSourceThreadShutdown()
{
if (gDvm.gcHeap != NULL && gDvm.concurrentMarkSweep) {
gcDaemonShutdown();
@@ -640,7 +640,7 @@ dvmHeapSourceShutdown(GcHeap **gcHeap)
/*
* Gets the begining of the allocation for the HeapSource.
*/
-void *dvmHeapSourceGetBase(void)
+void *dvmHeapSourceGetBase()
{
return gHs->heapBase;
}
@@ -712,7 +712,7 @@ void dvmHeapSourceGetRegions(uintptr_t *base, uintptr_t *max, uintptr_t *limit,
/*
* Get the bitmap representing all live objects.
*/
-HeapBitmap *dvmHeapSourceGetLiveBits(void)
+HeapBitmap *dvmHeapSourceGetLiveBits()
{
HS_BOILERPLATE();
@@ -722,14 +722,14 @@ HeapBitmap *dvmHeapSourceGetLiveBits(void)
/*
* Get the bitmap representing all marked objects.
*/
-HeapBitmap *dvmHeapSourceGetMarkBits(void)
+HeapBitmap *dvmHeapSourceGetMarkBits()
{
HS_BOILERPLATE();
return &gHs->markBits;
}
-void dvmHeapSourceSwapBitmaps(void)
+void dvmHeapSourceSwapBitmaps()
{
HeapBitmap tmp;
@@ -738,7 +738,7 @@ void dvmHeapSourceSwapBitmaps(void)
gHs->markBits = tmp;
}
-void dvmHeapSourceZeroMarkBitmap(void)
+void dvmHeapSourceZeroMarkBitmap()
{
HS_BOILERPLATE();
diff --git a/vm/alloc/MarkSweep.cpp b/vm/alloc/MarkSweep.cpp
index 0bb5f02d6..a81d3eab8 100644
--- a/vm/alloc/MarkSweep.cpp
+++ b/vm/alloc/MarkSweep.cpp
@@ -372,7 +372,7 @@ static void rootReMarkObjectVisitor(void *addr, u4 thread, RootType type,
/*
* Grays all references in the roots.
*/
-void dvmHeapReMarkRootSet(void)
+void dvmHeapReMarkRootSet()
{
GcMarkContext *ctx = &gDvm.gcHeap->markContext;
assert(ctx->finger == (void *)ULONG_MAX);
@@ -726,7 +726,7 @@ void dvmHeapScanMarkedObjects(bool isPartial)
processMarkStack(ctx);
}
-void dvmHeapReScanMarkedObjects(void)
+void dvmHeapReScanMarkedObjects()
{
GcMarkContext *ctx = &gDvm.gcHeap->markContext;
@@ -997,7 +997,7 @@ static int isUnmarkedObject(void *obj)
return !isMarked((Object *)obj, &gDvm.gcHeap->markContext);
}
-void sweepWeakJniGlobals(void)
+void sweepWeakJniGlobals()
{
IndirectRefTable *table = &gDvm.jniWeakGlobalRefTable;
Object **entry = table->table;
@@ -1014,7 +1014,7 @@ void sweepWeakJniGlobals(void)
* Process all the internal system structures that behave like
* weakly-held objects.
*/
-void dvmHeapSweepSystemWeaks(void)
+void dvmHeapSweepSystemWeaks()
{
dvmGcDetachDeadInternedStrings(isUnmarkedObject);
dvmSweepMonitorList(&gDvm.monitorList, isUnmarkedObject);
diff --git a/vm/alloc/Verify.cpp b/vm/alloc/Verify.cpp
index f36f44bf1..1a8307aff 100644
--- a/vm/alloc/Verify.cpp
+++ b/vm/alloc/Verify.cpp
@@ -145,7 +145,7 @@ static void verifyRootReference(void *addr, u4 threadId,
/*
* Verifies references in the roots.
*/
-void dvmVerifyRoots(void)
+void dvmVerifyRoots()
{
dvmVisitRoots(verifyRootReference, NULL);
}