mailing list of musl libc
 help / color / mirror / code / Atom feed
36437653bb9085b02908f402403e59cee7bd637c blob 203 bytes (raw)

1
2
3
4
5
6
7
8
9
 
#include <stdint.h>
#include "syscall.h"

void *sbrk(intptr_t inc)
{
	unsigned long cur = syscall(SYS_brk, 0);
	if (inc && syscall(SYS_brk, cur+inc) != cur+inc) return (void *)-1;
	return (void *)cur;
}
debug log:

solving 3643765 ...
found 3643765 in https://git.vuxu.org/mirror/musl/

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).