mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 05:42:29 +00:00
Do code cleanup use duff device linenoise i/o
This commit is contained in:
parent
6ff46ca373
commit
2f56ebfe78
79 changed files with 1393 additions and 1484 deletions
|
@ -50,8 +50,9 @@ struct MemoryIntervals {
|
|||
|
||||
extern hidden struct MemoryIntervals _mmi;
|
||||
|
||||
const char *DescribeFrame(int);
|
||||
bool IsMemtracked(int, int) hidden;
|
||||
void PrintSystemMappings(int) hidden;
|
||||
const char *DescribeFrame(int) hidden;
|
||||
char *DescribeMapping(int, int, char[hasatleast 8]) hidden;
|
||||
bool AreMemoryIntervalsOk(const struct MemoryIntervals *) nosideeffect hidden;
|
||||
void PrintMemoryIntervals(int, const struct MemoryIntervals *) hidden;
|
||||
|
@ -175,18 +176,6 @@ forceinline unsigned FindMemoryInterval(const struct MemoryIntervals *mm,
|
|||
return l;
|
||||
}
|
||||
|
||||
forceinline bool IsMemtracked(int x, int y) {
|
||||
unsigned i;
|
||||
i = FindMemoryInterval(&_mmi, x);
|
||||
if (i == _mmi.i) return false;
|
||||
if (x < _mmi.p[i].x) return false;
|
||||
for (;;) {
|
||||
if (y <= _mmi.p[i].y) return true;
|
||||
if (++i == _mmi.i) return false;
|
||||
if (_mmi.p[i].x != _mmi.p[i - 1].y + 1) return false;
|
||||
}
|
||||
}
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_RUNTIME_MEMTRACK_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue