Coder Social home page Coder Social logo

Comments (6)

slimsag avatar slimsag commented on May 9, 2024

Thank you for filing this, will investigate

from mach.

silversquirl avatar silversquirl commented on May 9, 2024

@xor256 Assuming you're talking about mach-glfw, are you seeing any leaks unique to mach's wrapper? GLFW itself leaks memory on my system, so if that's what you're seeing, it should really be reported to upstream

from mach.

alichraghi avatar alichraghi commented on May 9, 2024

does mach-glfw only uses c_allocator or other zig's allocators are used too? because as far as i know valgrind does't detect zig memory leaks

from mach.

slimsag avatar slimsag commented on May 9, 2024

@alichraghi we use only c_allocator internally, but the tests use other Zig allocators.

This issue was opened quite a while ago, possibly fixed. We just need someone with Linux to run with Valgrind to confirm

from mach.

alichraghi avatar alichraghi commented on May 9, 2024

i ran the very simple code example in glfw documention in C and Zig (using mach). both almost have same valgrind output. i think it's because the window close duration difference. i also found some comments on the internet, they say detected leaks are caused by X11 or GPU Driver not GLFW
Zig:

definitely lost: 0 bytes in 0 blocks
indirectly lost: 0 bytes in 0 blocks
possibly lost: 178,039 bytes in 1,476 blocks
still reachable: 1,450,310 bytes in 1,993 blocks
suppressed: 1,700 bytes in 1 blocks

C:

definitely lost: 0 bytes in 0 blocks
indirectly lost: 0 bytes in 0 blocks
possibly lost: 178,311 bytes in 1,478 blocks
still reachable: 23,562,177 bytes in 4,380 blocks
suppressed: 1,700 bytes in 1 blocks

from mach.

slimsag avatar slimsag commented on May 9, 2024

Great, thanks for checking @alichraghi ! I'll close this, if anyone finds anything else here feel free to create a new issue!

from mach.

Related Issues (20)

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.