Code Monkey home page Code Monkey logo

arena-allocator's People

Contributors

ccgargantua avatar player01osu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

player01osu

arena-allocator's Issues

FR `arena_copy` and `arena_copy_allocation`

FR: Short-hand wrapper functions for memcpy (probably ARENA_MEMCPY) for simplified copying of an arena or an arena allocation would be nice, especially copying the arena. inline-friendly would be ideal, which should be relatively easy considering a wrapper for memcpy (or similar) is what should be done.

`arena_expand()` relies on implementation for deallocation

The arena_expand() function relies on implementation for deallocation

As for as I can tell: deallocation of the ptr argument for realloc (the default realloc for ARENA_REALLOC) is not officially guaranteed until C99.

(C99, 7.20.3.4p2) "The realloc function deallocates the old object pointed to by ptr and returns a pointer to a new object that has the size specified by size."

This means memory leaks are possible depending on the implementation's decision to free existing allocations for the pointer passed to it.

FR Configure `Makefile` for windows compatibility

The current Makefile only functions as intended on Linux, but not Windows. Here is a description of problems and potential solutions.

  1. Valgrind is not supported on Windows. Since PRs require absence of memory leaks with $ make test, finding an alternative command line memory profiler is necessary and should be conditionally applied to Windows builds.
  2. The absence of the .exe file extensions on generated executables results in failure of automated runs, also present on $ make test. This could likely be solved with a simple macro. EXT := .exe or something similar.
  3. The default compiler for $(CC) chosen when building on Windows is cc, which is not ideal. I would prefer MSVC be used, or at the very least mingw. I'm not really sure how to handle this one to be completely honest.

I tested this using make installed through the chocolatey package manager for windows.

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.