35 Commits

Author SHA1 Message Date
Saagar Jha
955d653b19 Replace read lock with write lock in mm_copy 2020-01-09 23:59:37 -08:00
Theodore Dubois
b9e249b73f Unbreak heap shrink case of brk
Apparently this line of code has never been executed before, because if
it ever were to be executed, you'd get memory corruption.
2020-01-03 19:28:25 -08:00
Theodore Dubois
2b750f60ac Implement /proc/pid/maps 2019-11-11 01:28:26 -08:00
Theodore Dubois
0c5c4c952b Ignore address passed without MAP_FIXED if it overlaps
Fixes #497
2019-09-30 20:40:46 -07:00
Theodore Dubois
68e7dd86d3 Fix mmap clobbering existing mappings 2019-08-25 19:06:08 -07:00
Theodore Dubois
1e2c1ceabd Fix leak of child process memory when a multithreaded process forks 2019-07-07 22:19:17 -07:00
Theodore Dubois
65795496c4 Implement MAP_SHARED 2019-07-07 19:20:53 -07:00
Theodore Dubois
b100b2bcb7 Fix segfault when calling old mmap 2019-07-07 17:37:13 -07:00
Theodore Dubois
c897ca4731 Stub msync 2019-07-05 19:38:46 -07:00
Theodore Dubois
991b5a0448 Remove debugging print 2019-07-05 18:01:44 -07:00
Theodore Dubois
c6e818b5c5 Include the reason for a segfault 2019-07-05 17:44:29 -07:00
Theodore Dubois
eb6cd79745 Speed up copy-on-write and unmap operations 2019-02-04 20:15:55 -08:00
Theodore Dubois
5aeb536d61 Copy all the fields of struct mm 2019-01-10 19:12:12 -05:00
Theodore Dubois
328fc5b4a4 Fix leak of exefile 2019-01-10 10:36:10 -05:00
Theodore Dubois
032a218a63 Mark unused function arguments 2019-01-05 17:18:54 -08:00
Theodore Dubois
5cfec48854 Separate out some components of struct mem into struct mm 2019-01-04 15:17:37 -08:00
Theodore Dubois
1e5ee8f215 Stub mlock 2018-12-19 13:59:26 -08:00
Theodore Dubois
cf9509cbad Return EFAULT for bad address passed to mremap 2018-12-16 18:57:39 -08:00
Theodore Dubois
a4e91c7f10 Add stub for mbind 2018-12-01 14:55:54 -08:00
Theodore Dubois
e95a2acbdd Don't return NULL from successful mremap 2018-11-25 17:39:17 -08:00
Theodore Dubois
a6fc5bd1ea Use radix tree for pagetables, dramatically reducing memory usage 2018-11-21 19:31:51 -08:00
Theodore Dubois
bd36fb7144 Implement growing anonymous mappings with mremap 2018-11-14 18:51:59 -08:00
Ryan Hileman
1ba20f90d9 fix sys_mmap 2018-11-12 13:18:50 -08:00
Theodore Dubois
53513c4809 Implement shrinking with mremap 2018-11-02 09:55:15 -07:00
Theodore Dubois
6cfbe6a15f iMake brk calls with 0 not fail immediately 2018-10-08 11:43:01 -07:00
Theodore Dubois
4a8efe8d01 Make various memory management things shared between threads 2018-10-07 13:02:15 -07:00
Theodore Dubois
498c17b1a3 Foundations of jit, no actual compiling yet 2018-05-03 14:48:08 -07:00
Theodore Dubois
d1a8dff6a8 Add a couple of straces 2018-03-28 15:37:28 -07:00
Theodore Dubois
eddf023669 Move pwd, root, uname out into its own struct 2018-01-21 17:24:32 -08:00
Theodore Dubois
6a907425e6 Rename process to task 2018-01-21 12:44:55 -08:00
Theodore Dubois
728ca235c0 Replace files array with fdtable structure 2018-01-15 19:18:38 -08:00
Theodore Dubois
bf3b711cdd Implement tracking of process cpu usage 2018-01-10 15:33:11 -08:00
Theodore Dubois
07c4ab82bf Add a read-write lock to the memory object 2017-12-24 16:02:15 -08:00
Theodore Dubois
e25302ed98 Redesign VFS mmap 2017-12-06 15:14:17 -08:00
Theodore Dubois
f1e63c43e0 Rename sys directory to kernel
A number of the headers in it were conflicting with macOS system
headers.
2017-10-13 16:54:11 -07:00