Logo
Explore Help
Sign In
fluencelabs/musl
1
0
Fork 0
You've already forked musl
mirror of https://github.com/fluencelabs/musl synced 2025-06-23 11:41:57 +00:00
Code Issues Projects Releases Wiki Activity
Files
b20760c02318fa6da228587c401a8b2bb22a1aab
musl/src/legacy/valloc.c

9 lines
124 B
C
Raw Normal View History

add legacy function valloc it was already declared in stdlib.h, but not defined anywhere.
2013-08-02 18:34:39 -04:00
#define _BSD_SOURCE
#include <stdlib.h>
support configurable page size on mips, powerpc and microblaze PAGE_SIZE was hardcoded to 4096, which is historically what most systems use, but on several archs it is a kernel config parameter, user space can only know it at execution time from the aux vector. PAGE_SIZE and PAGESIZE are not defined on archs where page size is a runtime parameter, applications should use sysconf(_SC_PAGE_SIZE) to query it. Internally libc code defines PAGE_SIZE to libc.page_size, which is set to aux[AT_PAGESZ] in __init_libc and early in __dynlink as well. (Note that libc.page_size can be accessed without GOT, ie. before relocations are done) Some fpathconf settings are hardcoded to 4096, these should be actually queried from the filesystem using statfs.
2013-09-15 02:00:32 +00:00
#include "libc.h"
add legacy function valloc it was already declared in stdlib.h, but not defined anywhere.
2013-08-02 18:34:39 -04:00
void *valloc(size_t size)
{
return memalign(PAGE_SIZE, size);
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.2 Page: 85ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API