8000 Dynamic output memory leak · Issue #841 · gpujs/gpu.js · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Dynamic output memory leak #841
Open
@Chornomor78

Description

@Chornomor78

On Windows 11, node.js v20.14.0 I have a memory leak in the case of dynamic output:

const {GPU} = require('gpu.js');
const gpu = new GPU();

const test = gpu.createKernel(function() {
	return 1;
}).setDynamicOutput(true);

for (let i=0; i<1e6; i++) {
	const size = 100; // we can generate a random output size

	test.setOutput([size]); // without this line memory doesn't leak

	const sum = test().reduce((a,e)=>a+e); // use the result

	if (i % 1000 == 0)
		console.log(i + ": " + sum); // debug logging
}

Memory leak can be seen in Task Manager.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0