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

Function getSize

source/sdl/emscripten/mainloop.cpp:41–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

mainloopFunction · 0.70

Calls 1

BFunction · 0.85

Tested by

no test coverage detected