RTEMS | IMFS User allocator Plugin Code (!534)

Joel Sherrill (@joel) gitlab at rtems.org
Wed Jun 25 22:40:57 UTC 2025



Merge request https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/534 was reviewed by Joel Sherrill

--
  
Joel Sherrill started a new discussion on cpukit/include/rtems/confdefs/libio.h: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/534#note_125359

 >  
 >  const int imfs_memfile_bytes_per_block = CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK;
 > +const IMFS_memfile_ops imfs_memfile_default_ops = {

This is prototyped in imfs.h and should be in an IMFS C file I think. Not in libio.h.

--
  
Joel Sherrill started a new discussion on cpukit/include/rtems/imfs.h: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/534#note_125360

 >    const IMFS_node_control *control;
 >  };
 > +typedef void *(*IMFS_memfile_allocator)(void);

These will need Doxygen comments.

--
  
Joel Sherrill started a new discussion on cpukit/libfs/src/imfs/imfs_memfile.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/534#note_125361

 >  
 > -  memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
 > +  // memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);

This should be deleted when it works.

--
  
Joel Sherrill started a new discussion on cpukit/libfs/src/imfs/imfs_memfile.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/534#note_125362

 >  )
 >  {
 > -  free(memory);

Delete old code.

--
  
Joel Sherrill started a new discussion on cpukit/libfs/src/imfs/imfs_memfile.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/534#note_125363

 >  };
 > +
 > +void *default_allocator(){

Should have (void)

Formatting isn't right for this block.

--
  
Joel Sherrill started a new discussion on testsuites/psxtests/psximfs03/init.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/534#note_125364

 > +#ifdef HAVE_CONFIG_H

New file needs header.

--
  
Joel Sherrill started a new discussion on testsuites/psxtests/psximfs03/init.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/534#note_125365

 > +)
 > +{
 > +  if(!freelist) return NULL;

"if ("

I expect format checker to complain about more.

--
  
Joel Sherrill started a new discussion on testsuites/psxtests/psximfs03/init.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/534#note_125366

 > +rtems_task Init(
 > +  rtems_task_argument argument
 > +)

There must be more code below here.

--
  
Joel Sherrill started a new discussion on testsuites/psxtests/psximfs03/init.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/534#note_125367

 > +#ifdef HAVE_CONFIG_H
 > +#include "config.h"

There must be build yml files, scn, doc, etc. This is not functional yet.


-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/534
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/20250625/7c7049f9/attachment-0001.htm>


More information about the bugs mailing list