{"id":26649055,"url":"https://github.com/yohhoy/malloc-server","last_synced_at":"2026-02-27T09:10:46.251Z","repository":{"id":283521869,"uuid":"952045527","full_name":"yohhoy/malloc-server","owner":"yohhoy","description":"malloc REST Server","archived":false,"fork":false,"pushed_at":"2025-03-28T10:17:20.000Z","size":14,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-12T19:08:33.113Z","etag":null,"topics":["go","golang","jokes-api","rest-api"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yohhoy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-20T16:39:30.000Z","updated_at":"2025-03-28T10:21:25.000Z","dependencies_parsed_at":"2025-09-12T18:24:13.306Z","dependency_job_id":"5886d888-cb6f-4ca4-b575-48fdfddd3ddb","html_url":"https://github.com/yohhoy/malloc-server","commit_stats":null,"previous_names":["yohhoy/malloc-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yohhoy/malloc-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yohhoy%2Fmalloc-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yohhoy%2Fmalloc-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yohhoy%2Fmalloc-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yohhoy%2Fmalloc-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yohhoy","download_url":"https://codeload.github.com/yohhoy/malloc-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yohhoy%2Fmalloc-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29889038,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T08:34:21.514Z","status":"ssl_error","status_checked_at":"2026-02-27T08:32:38.035Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","jokes-api","rest-api"],"created_at":"2025-03-25T00:47:51.984Z","updated_at":"2026-02-27T09:10:46.235Z","avatar_url":"https://github.com/yohhoy.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# malloc-server\n[![test CI](https://github.com/yohhoy/malloc-server/actions/workflows/test.yml/badge.svg)](https://github.com/yohhoy/malloc-server/actions/workflows/test.yml)\n[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n\nmalloc REST Server - A RESTful server that allows you to allocate(`malloc`)/deallocate(`free`) memory blocks, and perform byte-wise read/write operation on memory address via an HTTP interface.\n\n## Demo\n```sh\n$ go build\n$ GIN_MODE=release ./malloc-server\n\n$ ADDR=$(curl -X POST -s http://localhost:8080/memory/malloc -d '{\"size\":10}' | jq .addr)\n$ echo $ADDR\n$ curl -X PUT -s http://localhost:8080/memory/$ADDR -d '{\"val\":123}'\n$ curl -X GET -s http://localhost:8080/memory/$ADDR | jq .val\n$ curl -X POST -s http://localhost:8080/memory/free -d \"{\\\"addr\\\":$ADDR}\"\n```\n\nTry following client implementation.\n\n- [yohhoy/malloc-client-cpp](https://github.com/yohhoy/malloc-client-cpp) - C++\n\n## API\n```\nPOST /memory/malloc\n    Req  {\"size\": \u003cnumber\u003e}\n    Resp {\"addr\": \u003cnumber\u003e, \"size\": \u003cnumber\u003e}\n\nPOST /memory/free\n    Req  {\"addr\": \u003cnumber\u003e}\n    Resp (none)\n\nPUT /memory/:addr\n    Req  {\"val\": \u003c0-255\u003e}\n    Resp (none)\n\nGET /memory/:addr\n    Req  (none)\n    Resp {\"val\": \u003c0-255\u003e}\n```\n\n## Security Considerations\n\nThe memory management of this server is sandboxed and utilizes \"virtual\" addresses to represent memory locations. Therefore, clients can NEVER access arbitrary memory on the host machine.\n\nHowever, note that if a malicious client makes an excessive number of memory allocation requests, the host system's memory may become exhausted.\n\n\n# License\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyohhoy%2Fmalloc-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyohhoy%2Fmalloc-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyohhoy%2Fmalloc-server/lists"}