release mem
This commit is contained in:
parent
93068241d3
commit
a270349dae
5
os/mem.c
5
os/mem.c
@ -204,7 +204,7 @@ int Yap_open_buf_write_stream(encoding_t enc, memBufSource src) {
|
|||||||
if (sno < 0)
|
if (sno < 0)
|
||||||
return -1;
|
return -1;
|
||||||
st = GLOBAL_Stream + sno;
|
st = GLOBAL_Stream + sno;
|
||||||
st->status = Output_Stream_f | InMemory_Stream_f;
|
st->status = Output_Stream_f | InMemory_Stream_f|FreeOnClose_Stream_f;
|
||||||
st->linepos = 0;
|
st->linepos = 0;
|
||||||
st->charcount = 0;
|
st->charcount = 0;
|
||||||
st->linecount = 1;
|
st->linecount = 1;
|
||||||
@ -281,7 +281,8 @@ char *Yap_MemExportStreamPtr(int sno) {
|
|||||||
static Int peek_mem_write_stream(
|
static Int peek_mem_write_stream(
|
||||||
USES_REGS1) { /* '$peek_mem_write_stream'(+GLOBAL_Stream,?S0,?S) */
|
USES_REGS1) { /* '$peek_mem_write_stream'(+GLOBAL_Stream,?S0,?S) */
|
||||||
Int sno =
|
Int sno =
|
||||||
Yap_CheckStream(ARG1, (Output_Stream_f | InMemory_Stream_f), "close/2");
|
Yap_CheckStream(ARG1, (Output_Stream_f |
|
||||||
|
InMemory_Stream_f), "close/2");
|
||||||
Int i;
|
Int i;
|
||||||
Term tf = ARG2;
|
Term tf = ARG2;
|
||||||
CELL *HI;
|
CELL *HI;
|
||||||
|
Reference in New Issue
Block a user