Commit d04578b
committed
docs: fix an omission in the rtapi_shmem manpage
Make explicit an important promise made by rtapi_shmem_new(): When a
block of memory is first allocated, it is initialized to all zero bytes.
On Uspace rtapi_shmem_new() calls shmget(), which zeros the memory when
creating a new shared memory block:
https://man7.org/linux/man-pages/man2/shmget.2.html#DESCRIPTION
On RTAI rtapi_shmem_new() calls rtai_kmalloc() and rtai_malloc(), which
both end up calling _rt_shmem_new(). The documentation does not say
anything about initialization of freshly allocated memory buffers, but
Paolo Mantegazza (one of the main RTAI developers) said that RTAI *does*
zeros shmem buffers, and pointed to this code:
https://mail.rtai.org/pipermail/rtai/2022-January/028282.html
http://cvs.savannah.nongnu.org/viewvc/rtai/magma/base/ipc/shm/shm.c?view=markup#l691 parent 27d8149 commit d04578b
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
| 38 | + | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
0 commit comments