MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / getSize

Function getSize

source/sdl/multiThreaded/threadedMainloop.cpp:39–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37static thread_local bool isMainThread;
38
39static BString getSize(int pages)
40{
41 pages *= 4;
42 if (pages < 2048) {
43 return BString::valueOf(pages) + B("KB");
44 }
45 if (pages < 2048 * 1024) {
46 return BString::valueOf(pages / 1024) + B("MB");
47 }
48 return BString::valueOf(pages / 1024 / 1024) + B("GB");
49}
50extern int allocatedRamPages;
51
52bool isMainthread() {

Callers 1

doMainLoopFunction · 0.70

Calls 1

BFunction · 0.85

Tested by

no test coverage detected