summary refs log tree commit diff stats
path: root/lib/system/osalloc.nim
Commit message (Collapse)AuthorAgeFilesLines
* Haiku support for Nim (#8542)alaviss2018-08-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * posix_other: Haiku now has spawn.h This is added per https://dev.haiku-os.org/ticket/13446 * posix_other: Add Haiku specific Dirent members * cpuinfo: Add an implementation for Haiku * distros: Add basic Haiku support * encodings: update Haiku support * fenv, math: Haiku now provides libm * times: Add Haiku struct members * ansi_c, osalloc: Add Haiku constants * threads: Add Haiku support * testament: Haiku uses LIBRARY_PATH * nim.cfg: Update Haiku support libnetwork should only be linked if network functions are used * threads: Haiku does not support -pthread switch * tworkingdir: Haiku's env is in /bin * posix_other: add SIGKILLTHR for Haiku * sockets: link with libnetwork on Haiku * coro: correct ucontext.h location http://pubs.opengroup.org/onlinepubs/009696699/basedefs/ucontext.h.html * coro: ucontext backend is not available on Haiku Haiku doesn't provide the <ucontext.h> header, as it was removed from POSIX * coro: fix setjmp backend The compiler does not allow statements after a noreturn function * nativesockets: Haiku doesn't support AI_V4MAPPED * system: hostOS can contains "haiku" * os: add support for Haiku's packagefs packagefs is read-only, but there are writable holes to the underlying file system as well * os: update constant for Haiku
* Rewrite the memory management code for Nintendo Switch (#8169)Joey2018-07-051-29/+103
| | | | | | | | | | | | | | | | Rewrite the memory management code for Nintendo Switch The first implementation was naive and did not account for multiple memory allocations. However, this implementation may still be incomplete. Currently, when running applications, the code runs fine. When the application is exited via code (the end of the program is reached or quit() is called), the Switch will crash. Not sure why this happens, but I suspect it is from Nim memory allocations. I suspect the memory allocations because when I compile the helloworld application without any Nim allocations (just C function calls) and use `--gc:none` as a compile option, the application exits fine.
* Nintendo switch support (#8069)Joey2018-06-271-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | * Add config section for Nintendo Switch * Add compiler configuration for Nintendo Switch and it's CPU * Add specific lib code for Nintendo Switch * Add GC support for Nintendo Switch * Update changelog for Nintendo Switch * Update changelog with more info about fixed paths * Cleaned up GC memory management a bit * Relocate docs for Switch * Rename aarch64NoneElfGcc to nintendoSwitchGCC * Remove armv8a57 * Fix installer.ini * Reuse code in linux and amd64 * Add posix defs for nintendo switch * Add more defined sections for nintendo switch * Remove old comment * Add what's not supported for Nintendo Switch docs * Make nintendoswitch == posix * Remove DEVKITPRO references from nim.cfg * Make PR extccomp changes * Remove Result type alias * Add separate switch consts file * Update docs for nintendo switch * Fix travis errors with undefined consts and add correct wait.h procs
* Native access to Genode environmentEmery Hemingway2018-06-071-1/+1
| | | | | | | | | | | | | | | | | Add a 'GenodeEnv' type and a 'componentConstructHook' to the system module. The 'componentConstructHook' allows for detection of POSIX style programs that exit implicitly or native Genode components that initialize to serve RPC requests and OS signals. This hook takes a 'GenodeEnv' argument so that the environment interface is passed cleanly to application code after globals are initialized. This is an typed pointer to a C++ object, procedures for accessing the environment will be available from a Nimble library and not included in the standard library. The standard library has an internal pointer to the environment object but this is not for external use, the undocumented global environment pointer has been removed.
* warn about inconsistent spacing around binary operators; fixes #7582Andreas Rumpf2018-05-051-1/+1
|
* Genode: constrain `osTryAllocPages` to RAM quota (#6883)Emery Hemingway2017-12-141-11/+1
| | | | | | | | | | | | Genode software components all start with an explicit RAM resource quota which may or may not be upgraded during runtime by the parent process. With this patch `osTryAllocPages` will fail if allocation exceeds quotas set by the parent and the `osAllocPages` procedure will trigger a blocking request to the parent to increase quotas. The previous behavior could potentially block both procedures indefinitely for a quota upgrade rather than fail and trigger garbage collection. This patch also adds tracking of Genode dataspace mappings into the component address space so they can be detached and freed.
* osalloc: improve error message when virtualFree failsAraq2017-12-031-1/+1
|
* support for the Genode OS framework (#5560)Emery Hemingway2017-03-311-0/+13
|
* fixes #5301Araq2017-01-301-2/+5
|
* add MAP_ANONYMOUS const for amd64, fix MAP_PRIVATE on mips etc (see fe36254)Jacek Sieka2016-10-121-3/+10
|
* Revert change to osalloc.nim from commit 8d7a45f.GaveUp2016-10-041-2/+0
| | | | | | | Change caused MAP_ANONYMOUS to have an incorrect value when compiling for mipsel. Fixes #4852.
* clean up a few stray c_stdout's in gc debug codeJacek Sieka2016-07-311-1/+1
|
* Plumb {.intdefine.} and {.strdefine.} pragmas.Jeff Ciesielski2016-07-041-1/+1
| | | | Shorthand so that users won't need to use the .magic pragma
* Add the ability to pass a value with the -d flagJeff Ciesielski2016-07-041-1/+2
| | | | | | | This allows the end user to use the {.magic: "IntDefine"/"StrDefine"} pragmas to pass values into code at compile time. This has a nice side effect of also allowing/requiring a default value to be assigned in the code (see osalloc.nim/StandaloneHeapSize for an example)
* Fixed emscripten compilationYuriy Glukhov2016-06-131-1/+1
|
* prefer consts to importing #defines from headersJacek Sieka2016-06-061-0/+2
| | | | | to be completed - better would be to have a libc wrapper that deals with all pesky C ABI details
* Fixing pragmas (so syntax highligting works).Hans Raaf2016-05-201-2/+2
|
* munmap for LLVMAndreas Rumpf2016-03-281-2/+2
|
* beginnings of --gc:stackAndreas Rumpf2016-03-281-0/+171