You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
344 B
12 lines
344 B
//memory leaker
|
|
|
|
export function leak(mb: number): void {
|
|
if (!window.beelzejuice) {
|
|
window.beelzejuice = []; //weird fanfic reference; i've seen this name used multiple times for alcoholic beverages
|
|
}
|
|
const id = Math.random().toString(36).slice(2);
|
|
window.beelzejuice.push(
|
|
new Uint8Array(Math.floor(mb * 1024 * 1024)).fill(666)
|
|
);
|
|
}
|