Coder Social home page Coder Social logo

Memory Leaks about pawn-memory HOT 9 CLOSED

Sancky avatar Sancky commented on July 20, 2024
Memory Leaks

from pawn-memory.

Comments (9)

Sancky avatar Sancky commented on July 20, 2024 1

I think it has something to do with the plugin, I was using some vectors on my server, and is not like i didn't cleared them properly, I'm sure I did, but memory was not removed when a vector was cleared, or sometimes was removed but not instantly, just after some minutes, if i can reproduce it i will send the script here.

from pawn-memory.

BigETI avatar BigETI commented on July 20, 2024

Hi, I do. Can you please elaborate, what exactly causes memory leaks?

from pawn-memory.

Sancky avatar Sancky commented on July 20, 2024

image
so, if I'm doing this, its increasing the memory, but is not clearing it, it remains same like that MAP wasn't even cleared.

from pawn-memory.

Sancky avatar Sancky commented on July 20, 2024

As I see, its like that MAP remains the same size (1000) even after clearing the values, same applies for vectors.

from pawn-memory.

BigETI avatar BigETI commented on July 20, 2024

That does not seem like, to be an issue of that plugin itself, but rather a library, or usage issue.

from pawn-memory.

BigETI avatar BigETI commented on July 20, 2024

Can you please provide a minimal reproducible code, and the methodology used for measurements?

from pawn-memory.

Sancky avatar Sancky commented on July 20, 2024
public OnGameModeInit() {
    SetTimer("testmap", 10000, false);
    return 1;
}

forward testmap();
public testmap() {
    new Map:map;

    for(new i = 0; i < 1000; ++i) {
        MAP_insert_val_val(map, i, i);
    }

    MAP_clear(map);

    print("called");
}

I just tried this script, and its increasing a little bit the memory, but it isn't clearing it as it should.

before that function is called
image

after that function is called
image

from pawn-memory.

Sancky avatar Sancky commented on July 20, 2024

I didn't use any special method to see memory leaks, just looking at memory

from pawn-memory.

BigETI avatar BigETI commented on July 20, 2024

Did you ever encounter Run time error 3: "Stack/heap collision (insufficient stack size)" while executing that example? (Try crashdetect to catch the real issue)
This problem is not a pawn-memory issue, but it is an issue with pawn-map, where too many recursive calls are made, during the map cleanup process, which causes the callback to terminate prematurely.
Therefore it is indeed leaking memory in that example.

I have no idea what the issue with pawn-vector is. Please open a ticket at the respective repository, and provide at least a working example, in order to re-produce the associated issue.

Thank you for reporting this issue!

from pawn-memory.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.