forked from source-academy/js-slang
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: use bytes instead of words for defining heap size Added some debug logs to track heap size and freed bytes during GC * feat: user defined `heapSize` * chore: update `prepare` script to build package * chore: yarn uses `prepack` instead * chore: f**k it we will just have a release branch with `/dist`
- Loading branch information
1 parent
c847e08
commit 90a45a6
Showing
7 changed files
with
20 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
/* Set of default configurations for the heap used in the Go ECE */ | ||
|
||
// The default size of the heap in words | ||
// Total heap size (in bytes) = DEFAULT_HEAP_SIZE * WORD_SIZE | ||
export const DEFAULT_HEAP_SIZE = 4096 // in words | ||
|
||
// The smallest addressable unit in the heap | ||
// We can think of it as the heap containing N number of words, each of size WORD_SIZE | ||
export const WORD_SIZE = 8 // in bytes | ||
|
||
// The default size of the heap in words | ||
// Total heap size (in bytes) | ||
export const DEFAULT_HEAP_SIZE = 4096 * WORD_SIZE | ||
|
||
// The byte offset to the size of a heap object within a tagged pointer | ||
export const SIZE_OFFSET = 5 // in bytes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters