Hi Eric,

[reply on-list as asked]

> On Jun 3, 2021, at 7:38 AM, Eric Auer <e.a...@jpberlin.de> wrote:
> 
> Why cannot FDIMPLES free the allocated memory before calling FDINST?

It is not that it can not do it. It is only that it’s original design (as a 
list editor) meant
that all remaining memory was available for it to do with as it pleased. The 
data for the
the package states, file lists, descriptions, groups, etc. are simply stored in 
memory 
wherever they fit. Different pieces of this are freed as needed to make room 
for more
immediate needs. These are managed through linked trees, lists and pointers to 
pointers to pointers. There is data is not in fixed memory layout like static 
memory lists.

To be able to free more memory, it would need to be able to shuffle things 
around and
put the list of changes as low as possible. This would require a good deal of 
work to make
it capable of doing that. Since there are other improvements I’d like to make 
that 
would require even more effort with the current design, implementing the data 
shuffle 
doesn’t make sense to me. A redesign really is the best choice overall.

> 
> Why do you need a writeable disk to test for FreeCOM? Also, I thought
> you already ensure having temp space for pipes etc. by using MEMDISK
> and some RAMDISK? Please give an example of an old code snippet for
> FreeCOM presence testing which you have removed.

Unfortunately, the oldest version of the installer is 1.2 PRE-3. That is when
I started pushing it to GitHub. By that time, I had already decided doing the
tests for FreeCOM were flakey. So, that code no longer exists.

According to GitHub, 1.2 PRE-3 was pushed 6 years ago. I don’t recall 
exactly what I did to test for FreeCOM. 

However, what it probably did was just used VER. This means it would need to
pipe that somewhere to compare it. This is a problem at installer start up. 
There
is no guarantee that a RAM drive exists or there are any other writeable 
filesystems. Nowadays, the boot media is generally able to create some sort
of RAM drive. And when one doesn’t exist, the installer will try to make one.
That way, it can do automate a couple more things in the early stages of the
install and possibly import a couple settings from a possibly existing config 
(like 
LANG=?). 

But, there are some situations that a RAM drive cannot be created. When that
occurs, the installer falls back to really dumb mode until the HD is 
partitioned and
formatted. Then it will start using it I/O redirection.

Sure, it could test for FreeCOM only when a RAM drive or writeable FS is 
present.
But, that would be more startup overhead which I think really isn’t necessary. 

The LiveCD uses MEMDISK. But, the LegacyCD, USB and CD boot floppy do not.

> 
> Thanks :-) Eric
> 

:-)

Jerome



_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to