RTEMS | IMFS User allocator Plugin Code (!534)
Bhavya Shah (@bhavyaBeliever)
gitlab at rtems.org
Wed Jul 2 13:05:49 UTC 2025
Bhavya Shah commented on a discussion on testsuites/psxtests/psximfs03/init.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/534#note_125736
> + if(!freelist) return NULL;
> + char *block = freelist;
> + freelist = *freelist;
> + memset(block, val, size);
> + return block;
> +}
> +
> +void deallocator(
> + char *blk
> +)
> +{
> + blk = (char **)blk;
> + *blk = freelist;
> + freelist = (char *)blk;
> +
> +}
This test case will be used to test the plugin code for allocator-deallocator.
I have used the concept of freelist which is a singly linked list. In allocation I am removing the node at head from freelist and while deallocation adding the node at head of freelist
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/534#note_125736
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20250702/4f3c52ea/attachment.htm>
More information about the bugs
mailing list