Re: [Freedos-devel] space in environment

2004-06-27 Thread tom ehlert
Hello Arkady,

 5. MS-command.com places its (resized) segment with environment right after
itself (original segment preserved not freed), FreeCOM places environment
into UMB, but, as I understand, with LAST_FIT.

 I think, (5) should be changed (LAST_FIT to BEST_FIT).

I think (5) should be NOT changed

(hint: what happens if you don't have UMB's)

tom



---
This SF.Net email sponsored by Black Hat Briefings  Training.
Attend Black Hat Briefings  Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
___
Freedos-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] space in environment

2004-06-27 Thread Arkady V.Belousov
Hi!

27--2004 15:52 [EMAIL PROTECTED] (tom ehlert) wrote to Arkady V.Belousov
[EMAIL PROTECTED]:

 5. MS-command.com places its (resized) segment with environment right after
itself (original segment preserved not freed), FreeCOM places environment
into UMB, but, as I understand, with LAST_FIT.
 I think, (5) should be changed (LAST_FIT to BEST_FIT).
te I think (5) should be NOT changed
te (hint: what happens if you don't have UMB's)

 In this case memory will be allocated in the _best_ segment (shortest,
which may fit) or after command.com (as with MS-DOS), if there is no
fragmentation.




---
This SF.Net email sponsored by Black Hat Briefings  Training.
Attend Black Hat Briefings  Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
___
Freedos-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] space in environment

2004-06-27 Thread tom ehlert
Hello Arkady,

 5. MS-command.com places its (resized) segment with environment right after
itself (original segment preserved not freed), FreeCOM places environment
into UMB, but, as I understand, with LAST_FIT.
 I think, (5) should be changed (LAST_FIT to BEST_FIT).
te I think (5) should be NOT changed
te (hint: what happens if you don't have UMB's)

  In this case memory will be allocated in the _best_ segment (shortest,
 which may fit) or after command.com (as with MS-DOS), if there is no
 fragmentation.

one more hint: command.com swaps itself into XMS




---
This SF.Net email sponsored by Black Hat Briefings  Training.
Attend Black Hat Briefings  Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
___
Freedos-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] space in environment

2004-06-27 Thread Arkady V.Belousov
Hi!

27--2004 17:56 [EMAIL PROTECTED] (tom ehlert) wrote to Arkady V.Belousov
[EMAIL PROTECTED]:

  In this case memory will be allocated in the _best_ segment (shortest,
 which may fit) or after command.com (as with MS-DOS), if there is no
 fragmentation.
te one more hint: command.com swaps itself into XMS

 And? command.com remain in memory stub, this stub my defragment its
memory (when env segment is adjacent with command.com block). Or, in case of
adjacent blocks, command.com may swap them (ie. place env segment before
itself).

 Yes, this requires slightly more work in command.com, but this gives
better memory distribution and less holes.




---
This SF.Net email sponsored by Black Hat Briefings  Training.
Attend Black Hat Briefings  Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
___
Freedos-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] space in environment

2004-06-26 Thread Arkady V.Belousov
Hi!

26--2004 20:35 [EMAIL PROTECTED] (FreeCOM) wrote to
[EMAIL PROTECTED]:

  Ie. applications always get reduced (to size of contents) envrionment
 memory block (notwithstanding /E, which affect only command.com' memory)?
F Hmm, Arkady, you fixed yourself a bug (or at least complained about a
F bug) in the kernel's environment handling when invoking a child, hence,

 Yes, task.c:ChidlEnv() contains bug when handling empty environment.

F you know very well that the kernel creates the environment passed to a
F child, not FreeCOM.
F This is also the behaviour of MS COMMAND/MS Kernel as far as I know.

 Yes, but who know, may be command.com not starts, but loads executable,
corrects its environment, then starts it. So, I ask to be sure, because
earlier was never think about this.

  Of course, but, for example, NDOS does itself permanent even without
 /p. BTW, I see no ways to differ INSTALL= and SHELL=.
F Then please tell me, how 4dos is to detect that no other shell is active
F currently, or, to put it into other words, that FreeCOM had been started
F by the kernel's process-0 loader.

 Well, I made some tests.

1. MS-command.com never assumes itself primary without /P.

2. without SHELL=, MS-DOS starts command.com with /P option.

3. when SHELL= line wrong or shell exits, MS-DOS tries to automatically run
   (searched in root, \msdos and \dos directories) command.com with /p and
   says Bad or missing Command Interpreter only when it not finds it.

4. when program runs through INSTALL= and SHELL= in MS-DOS, then parent PSP
   in env_seg (2C) and parent_PSP (16) contains both zero.

So, with (1) FreeCOM currently is consistent and, probably, may not be
changed. Other relate to FreeDOS kernel: (2) is same, (4) I plan to change,
(3) isn't necessary, at my teste.

 More tests:

5. MS-command.com places its (resized) segment with environment right after
   itself (original segment preserved not freed), FreeCOM places environment
   into UMB, but, as I understand, with LAST_FIT.

6. I don't know where MS-DOS preserves original environment from config.sys:
   I not found it in memory.

I think, (5) should be changed (LAST_FIT to BEST_FIT).

F BTW: Please refer to Undoc DOS's section about to find the master shell
F environment, so we need not discuss stuff like:

 How refer it?

F + INT-2E,
F + environment behind PSP,
F + first PSP.

 What there sayed about first PSP and what mean env behind PSP?

  I think, this should be implemented in any case.
F When FreeCOM can determine, if it is or is not the primary shell, it
F will be done.

 I mean not primarity, but too verbose startup screen with long help.




---
This SF.Net email sponsored by Black Hat Briefings  Training.
Attend Black Hat Briefings  Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
___
Freedos-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-devel