- Notifications
You must be signed in to change notification settings - Fork5
Commitb40b4dd
committed
Reserve zero as an invalid DSM handle.
Previously, the handle for the control segment could not be zero, butsome other DSM segment could potentially have a handle value of zero.However, that means that if someone wanted to store a dsm_handle thatmight or might not be valid, they would need a separate boolean tokeep track of whether the associated value is legal. That's annoying,so change things so that no DSM segment can ever have a handle of 0 -or as we call it here, DSM_HANDLE_INVALID.Thomas Munro. This was submitted as part of a much larger patch toadd an malloc-like allocator for dynamic shared memory, but this partseems like a good idea independently of the rest of the patch.1 parent0a74819 commitb40b4dd
2 files changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
| 185 | + | |
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| |||
476 | 476 | | |
477 | 477 | | |
478 | 478 | | |
| 479 | + | |
| 480 | + | |
479 | 481 | | |
480 | 482 | | |
481 | 483 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
| |||
0 commit comments
Comments
(0)