mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
LibC: Stub mlock in sys/mman
mlock is supposed to prevent memory from being paged out to swap, which we don't have currently. Required by OpenSSL.
This commit is contained in:
parent
add3a02ddd
commit
f5d4de8b66
Notes:
sideshowbarker
2024-07-18 07:44:30 +09:00
Author: https://github.com/Lubrsi Commit: https://github.com/SerenityOS/serenity/commit/f5d4de8b66b Pull-request: https://github.com/SerenityOS/serenity/pull/9095 Reviewed-by: https://github.com/gmta Reviewed-by: https://github.com/linusg ✅
2 changed files with 8 additions and 0 deletions
|
@ -4,6 +4,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <AK/Format.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
@ -82,4 +83,10 @@ void* allocate_tls(const char* initial_data, size_t size)
|
|||
}
|
||||
return (void*)rc;
|
||||
}
|
||||
|
||||
int mlock(const void*, size_t)
|
||||
{
|
||||
dbgln("FIXME: Implement mlock()");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,5 +41,6 @@ int mprotect(void*, size_t, int prot);
|
|||
int set_mmap_name(void*, size_t, const char*);
|
||||
int madvise(void*, size_t, int advice);
|
||||
void* allocate_tls(const char* initial_data, size_t);
|
||||
int mlock(const void*, size_t);
|
||||
|
||||
__END_DECLS
|
||||
|
|
Loading…
Reference in a new issue