mirror of
https://github.com/RustyRaptor/parallel-programming.git
synced 2026-12-04 16:15:16 -07:00
fixed shared memory not deleting
This commit is contained in:
1 parent
abb48deb32
commit
a3b6083a79
1 file changed
+7
@@ -21,6 +21,11 @@ Changelog
|
||||
- Added shared memory dynamically allocated array for results
|
||||
- BUGFIX: array was not actually shared because i was using malloc instaed of
|
||||
using the shared memory get method to allocate
|
||||
|
||||
10/06
|
||||
- Fixed thread so it has its own array
|
||||
- BUGFIX: Shared memory was not going away because I wasnt calling shmctl I
|
||||
mistakenly tought shmdt was all I needed.
|
||||
-
|
||||
*/
|
||||
|
||||
@@ -214,6 +219,8 @@ int main(int argc, char const *argv[])
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
shmctl(shmid, IPC_RMID, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user