diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-05-03 00:51:45 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-05-03 00:51:45 +0200 |
commit | 4c639475ce8cf0aec59632b6f7537169f1537f13 (patch) | |
tree | bc8aedcf42c1527d7ee62a43c5d73c923c24bcad /sys/src/cmd/cwfs/scsi.c | |
parent | 72e4d850a4c2b334b3442dd39aa973650e5d5ba4 (diff) |
cwfs: fix 1GB memsize limitation
the malloc pool allocator is limited in its allocation
size. as almost all data structures in cwfs are never
freed, use brk() in ialloc() instead of mallocalign().
this means memory returned by ialloc() cannot be freed!
to make sure we do not call free by accident, remove
the #define malloc(n) ialloc(n, 0) macro and use ialloc()
directly as in the original code to show the intend
of permanent allocations.
Diffstat (limited to 'sys/src/cmd/cwfs/scsi.c')
-rw-r--r-- | sys/src/cmd/cwfs/scsi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/src/cmd/cwfs/scsi.c b/sys/src/cmd/cwfs/scsi.c index 3e4c90d3b..6ce7a7cd9 100644 --- a/sys/src/cmd/cwfs/scsi.c +++ b/sys/src/cmd/cwfs/scsi.c @@ -46,8 +46,8 @@ scsiinit(void) tp->ctlrno = ctlrno; tp->targetno = targetno; - tp->inquiry = malloc(Ninquiry); - tp->sense = malloc(Nsense); + tp->inquiry = ialloc(Ninquiry, 0); + tp->sense = ialloc(Nsense, 0); } } } |