🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.ibm.pc.programmer
2 messages
2 total messages Started by Jonathan Oliver Thu, 04 Apr 1991 04:32
using "system" in C
#1138
Author: Jonathan Oliver
Date: Thu, 04 Apr 1991 04:32
9 lines
697 bytes
I am writing a rather large program (about 550K) in C and I recently
noticed that when I called "system" in the following way

	system("copy file1 file2");

there was not enough memory to perform the copy.
Is there a way of copying files that doesn't require as much memory.
Thanks in advance
	Jon Oliver
Re: using "system" in C
#1140
Author: Yves Forget
Date: Fri, 05 Apr 1991 02:52
35 lines
1993 bytes
In article <jono.670739550@dec06> jono@dec06.cs.monash.edu.au (Jonathan Oliver) writes:
>I am writing a rather large program (about 550K) in C and I recently
>noticed that when I called "system" in the following way
>
>	system("copy file1 file2");
>
>there was not enough memory to perform the copy.
>Is there a way of copying files that doesn't require as much memory.

If your program is so big, you may want to compile with size 
optimization (I know you can do that with Turbo C, but I didn't use it
too much, and I can't tell you how efficient it is).

Another way would be to have your program to copy the files, or,
depending on the context, you may want to generate a batch file that
will do the copy.

I think the better way is to use overlays.  If you have problems with
the system function (although you must know that the function loads a
(second) copy of command.com in memory), you may have problems generating
your code soon.  So you may have to think about overlays, or maybe buying
more memory...

Hope this helps

Yves

=======================================================================
Yves Forget                    forget at terre.dmi.usherb.ca (Internet)
Universite de Sherbrooke       bo05   at udesvm.bitnet (bitnet address)
-- 
=======================================================================
Yves Forget                    forget at terre.dmi.usherb.ca (Internet)
Universite de Sherbrooke       bo05   at udesvm.bitnet (bitnet address)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads