-
Notifications
You must be signed in to change notification settings - Fork 31
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
changed fds to array of pointers #21
base: master
Are you sure you want to change the base?
Conversation
You can't use And Nagy, consistency, please :"D |
Yea I was going through the code to understand more, at first I used fd_count, but okay I will rename it to ref if that matches the consistency 😂 |
I was thinking about caching the fd instead of kfree it, for not wasting a lot of time allocating and deallocating |
@nagyation caching is only effective if the resource is used frequently, applications don't usually open/close files 1000 times a second, so caching would be an over complication, and mostly a waste. Also we would use SLxB allocator later, the caching would be embedded in the allocator itself for many object types. About ref, it's literally there :"D I was gonna do it but had more important stuff to work on :"D |
@mohamed-anwar check it now 🤔 |
@nagyation checked it, will pull it when I push my local changes. Nice work! |
addedfd_count
to count the number of childs or others who are using the fd, so won't deallocate it unless no one is using it.still working on it to enhance it