From 7efe02d6231b91230ebfe07362cdcaaa87a3b8c1 Mon Sep 17 00:00:00 2001 From: ashmew2 Date: Mon, 15 May 2017 20:30:49 +0000 Subject: [PATCH] Add heap_init() for Netsurf (and others) git-svn-id: svn://kolibrios.org@6897 a494cfbc-eb01-0410-851d-a64ba20cac60 --- contrib/sdk/sources/newlib/libc/include/kos32sys.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/contrib/sdk/sources/newlib/libc/include/kos32sys.h b/contrib/sdk/sources/newlib/libc/include/kos32sys.h index ce98e89300..24ca4c05cb 100644 --- a/contrib/sdk/sources/newlib/libc/include/kos32sys.h +++ b/contrib/sdk/sources/newlib/libc/include/kos32sys.h @@ -338,6 +338,20 @@ uint32_t get_os_button(void) return val>>8; }; +static inline uint32_t +heap_init(void) +{ + uint32_t heapsize; + + __asm__ __volatile__( + "int $0x40" + :"=a"(heapsize) + :"a"(68),"b"(11) + ); + + return heapsize; +} + static inline uint32_t get_service(char *name) { uint32_t retval = 0;