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.
13 lines
375 B
13 lines
375 B
//memory leaker
|
|
|
|
export function leak(mb) {
|
|
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[id] = new Uint8Array(Math.floor(mb * 1024 * 1024)).fill(
|
|
666
|
|
);
|
|
return () => delete window.beelzejuice[id];
|
|
}
|