diff --git a/rtemsbsd/include/rtems/bsd/bsd.h b/rtemsbsd/include/rtems/bsd/bsd.h index 8ab0fdaf..1583dc9e 100644 --- a/rtemsbsd/include/rtems/bsd/bsd.h +++ b/rtemsbsd/include/rtems/bsd/bsd.h @@ -111,6 +111,13 @@ typedef enum { RTEMS_BSD_ALLOCATOR_DOMAIN_MALLOC } rtems_bsd_allocator_domain; +/** + * @brief The size for the page/mbufs default allocator domain. + * + * Applications may set this value to change the value returned by the default. + */ +extern uintptr_t rtems_bsd_allocator_domain_page_mbuf_size; + /** * @brief Returns the size for a specific allocator domain. * diff --git a/rtemsbsd/rtems/rtems-bsd-get-allocator-domain-size.c b/rtemsbsd/rtems/rtems-bsd-get-allocator-domain-size.c index 6471911a..a52ee50d 100644 --- a/rtemsbsd/rtems/rtems-bsd-get-allocator-domain-size.c +++ b/rtemsbsd/rtems/rtems-bsd-get-allocator-domain-size.c @@ -39,6 +39,8 @@ #include +uintptr_t rtems_bsd_allocator_domain_page_mbuf_size = 8 * 1024 * 1024; + uintptr_t rtems_bsd_get_allocator_domain_size(rtems_bsd_allocator_domain domain) { @@ -47,7 +49,7 @@ rtems_bsd_get_allocator_domain_size(rtems_bsd_allocator_domain domain) switch (domain) { case RTEMS_BSD_ALLOCATOR_DOMAIN_PAGE: case RTEMS_BSD_ALLOCATOR_DOMAIN_MBUF: - size = 8 * 1024 * 1024; + size = rtems_bsd_allocator_domain_page_mbuf_size; break; default: size = 0;