Title | We don't eat our own dog food |
Status | closed |
Priority | nice |
Assigned user | Gareth Rees |
Organization | Ravenbrook |
Description | Several test and utility programs use malloc() and free() instead of the MPS. This looks bad (it suggests to readers that the MPS is not good enough for these uses, when in fact it is better than malloc for our purposes since it has more checking), and it deprives us of some chances to test the MPS. |
Analysis | 1. abqtest uses malloc to allocate fixed-size blocks -- if we used MFS then we'd get size checking. 2. apss and arenacv use malloc to get a client arena buffer. This seems reasonable since it's the kind of thing a client might have to do, though there's really nothing stopping us from using MVFF. 3. eventtxt uses malloc and free for its hash tables of interned strings -- could use MFS for the fixed-size blocks and MVFF for the strings. 4. lockcov and lockut use malloc to allocate lock structures -- again, we could use MFS and get size checking. |
How found | inspection |
Evidence | None. |
Created by | Gareth Rees |
Created on | 2014-04-11 20:49:25 |
Last modified by | Gareth Rees |
Last modified on | 2014-04-12 15:34:43 |
History | 2014-04-11 GDR Created. |
Change | Effect | Date | User | Description |
---|---|---|---|---|
185477 | closed | 2014-04-12 15:34:43 | Gareth Rees | eventtxt no longer reports an error if there are multiple labels associated with an address. Instead, it store all the labels encountered, and prints the one that was in force at the time of each event. Use the MPS to manage memory, not malloc/free. Recommend sort before mpseventtxt and not afterwards (data is smaller; labelling is more accurate). |
185474 | open | 2014-04-11 21:27:31 | Gareth Rees | Use the MPS to manage memory in test cases, not malloc! |