-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Process Overhaul, Memory Tweaks, and Bug Squashing #117
Merged
Conversation
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
… no allocated blocks and updated debug messages to use magenta for better visibility. Da debug logs now shine like da loot, and da code won’t trip over empty chests.
… the maximum pid, then, it starts to hand out unallocated PID.
- Improved validation for virtual and physical address handling. - Replaced verbose logging with string-based summaries. - Introduced memory_info_t for better zone encapsulation. - Fixed alignment and pointer arithmetic issues. - Deprecated redundant macros and constants.
…nd zone allocator code.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Process Overhaul, Memory Tweaks, and Bug Squashing
1. Process Management Enhancements
pid_manager.c
for bitmap-based PID handling with initialization, allocation, and deallocation. It's like givin' every process its own shiny teef!pid_manager_get_free_pid
inprocess.c
and replaced oldscheduler_getpid
logic-no more fighting over IDs.process_create_init
to use dynamic PIDs and improved task initialization, makin' things run smoother than a well-oiled choppa.pid_manager_mark_free
to release PIDs when processes meet their glorious end.2. Memory Management Improvements
buddy_system.c
,zone_allocator.c
):buddysystem.h
tobuddy_system.h
for consistency.memory zone
operations-ain't leavin' anything to chance!paging.c
):create_vm_area
,clone_vm_area
, etc.). Now even da sneakiest bugs won't get through.pmmngr_init
, adding a ton of error checks-turns out even memory likes a bit of discipline.pmmngr_initialize_pages
andpmmngr_initialize_page_data
. This way the code is re-usable and easier to understand.3. Synchronization and Waiting
wait.c
):entry
instead ofwq
), more guessin' wotwq
means.stop_wake_function
for managing task STOP/CONT states, keepin' things in line.signal.c
):stop_wake_function
intostopped_queue
handling.4. Filesystem and String Handling
strcpy
/strcat
with saferstrncpy
/strncat
inrm.c
andt_mkdir.c
-less risk of buffer overruns!__build_path
helper for reusable path concatenation in directory operations (t_mkdir.c
).ext2_write_inode_block
for better reliability.EXT2
it's still a slog, but it won't krump itself apart anymore.kmem_cache_alloc
inEXT2
was completely annihilating the kernel. I found that bug after speed-running a paper for a midnight deadline. Y'know what, what better thing to do after a paper deadline if not a tasty session of midnight-coding-wtf-is-that-thing!-did-I-introduced-that-bug?!?-no-more-beer-for-you-sir.5. Debugging and Logging
log_level
parameter to__blkmngr_dump
-more control over da noise we make.debug.c
andpaging.c
.6. Error Handling Enhancements
is_valid_virtual_address
helper for safer address checks-no more orky guesswork.7. Bug Fixes
boot.c
.t_msgget.c
,t_semget.c
, and related tests-accuracy matters, even to Orks.8. Miscellaneous
waitpid
code for future tinkerin'.buddysystem.h
tobuddy_system.h
and fixed include paths-da naming squigs have been tamed.