https://github.com/christarazi/galloc
An implementation of `malloc(3)` in the Go programming language
https://github.com/christarazi/galloc
brk dynamic-memory-allocation go golang heap linux malloc memory-management unix
Last synced: 7 months ago
JSON representation
An implementation of `malloc(3)` in the Go programming language
- Host: GitHub
- URL: https://github.com/christarazi/galloc
- Owner: christarazi
- License: gpl-3.0
- Created: 2018-03-25T00:14:18.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-07T18:04:34.000Z (over 7 years ago)
- Last Synced: 2025-05-08T19:57:21.642Z (7 months ago)
- Topics: brk, dynamic-memory-allocation, go, golang, heap, linux, malloc, memory-management, unix
- Language: Go
- Size: 19.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# galloc
An implementation of `malloc(3)` in the Go programming language.
**Disclaimer**: this was created for educational purposes.
### Dependencies
This program is intended to be used on a Unix system because it depends on the
[`unix`](https://godoc.org/golang.org/x/sys/unix) package.
### Usage
Simply download / clone the repo then run:
```shell
$ cd path/to/repo
$ go build && ./malloc
```
## TODO
- ~~Add implementation for `free(3)`~~
- Add implementation for `realloc(3)`
- Add implementation for `calloc(3)`
- Allow for use in C using cgo
## License
This program is free software, distributed under the terms of the [GNU] General
Public License as published by the Free Software Foundation, version 3 of the
License (or any later version). For more information, see the file LICENSE.