-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kernel: preallocate 4 slots for process' fd array
- Loading branch information
Showing
1 changed file
with
1 addition
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,7 +118,6 @@ module Multiprocessing | |
property pgid | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
ffwff
Author
Owner
|
||
|
||
# files | ||
MAX_FD = 16 | ||
property fds | ||
|
||
# mmap | ||
|
@@ -148,7 +147,7 @@ module Multiprocessing | |
def initialize(@argv : GcArray(GcString), | ||
@cwd : GcString, @cwd_node : VFSNode, | ||
@environ = GcArray(EnvVar).new(0)) | ||
@fds = GcArray(FileDescriptor?).new MAX_FD | ||
@fds = GcArray(FileDescriptor?).new 4 | ||
@mmap_list = MemMapList.new | ||
end | ||
|
||
|
Did you know you can do:
and it's equivalent to the two lines above?