Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

Memory leak in unzip() #2595

@vflash

Description

@vflash

когда съедает всю память процесс умирает. тест делал на виртуальной машине с 1гб памятью.
eats all memory when the process dies. test done on a virtual machine with 1GB of memory.

latest (0.7.0-pre) node
node --expose-gc

var zlib = require('zlib');
var buffer = new Buffer('eJzT0yMAAGTvBe8=', 'base64');
function nullfun(){};

function test() {
    console.log(process.memoryUsage());
    for (var i = 0; i < 100; i++) {
        zlib.unzip(buffer, nullfun);
    };
    process.nextTick(test);
};
process.nextTick(test);
....
{ rss: 870871040, heapTotal: 42841856, heapUsed: 8936624 }
{ rss: 871223296, heapTotal: 42841856, heapUsed: 9354648 }
{ rss: 871858176, heapTotal: 42841856, heapUsed: 9630272 }
{ rss: 872452096, heapTotal: 42841856, heapUsed: 10048328 }
{ rss: 872853504, heapTotal: 42841856, heapUsed: 10331552 }
Убито
vflash@vu:~/work$

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions