Windows 10: error opening a ksh shell sh.exe:"_main: memory allocation at startup

Discus and support error opening a ksh shell sh.exe:"_main: memory allocation at startup in Windows 10 Support to solve the problem; Hi, After the one year anniversary update I get error opening a ksh shell sh.exe:"_main: memory allocation error during startup." Anyone else see... Discussion in 'Windows 10 Support' started by klong915, Sep 3, 2016.

  1. klong915 Win User

    error opening a ksh shell sh.exe:"_main: memory allocation at startup


    Hi,
    After the one year anniversary update I get error opening a ksh shell sh.exe:"_main: memory allocation error during startup."
    Anyone else see something like this?
    Thanks,
    Keith

    :)
     
    klong915, Sep 3, 2016
    #1
  2. AmirMurad Win User

    Warnhinweis von IMAP-Server: Fatal error: malloc: Cannot allocate memory

    Warnhinweis von IMAP-Server: Fatal error: malloc: Cannot allocate memory

    Warnhinweis von IMAP-Server: Fatal error: malloc: Cannot allocate memory
     
    AmirMurad, Sep 3, 2016
    #2
  3. beffa2 Win User
    how to kill or suspend programs that start automatically

    Hello chanchan05,



    thank you for your reply.

    I have SPB Mobile Shell v. 3.7.2 Build 673, installed on a Nokia C5-03.

    Using the Handy TaskMan app, I can monitor the active tasks and the available RAM memory.

    I have noticed that just after phone startup, the free memory is about 22MB.

    If I kill the SPB Mobile Shell task, the free RAM memory becomes 36MB (about +14MB).

    After 1 second, the phone loads SPB Mobile Shell again.



    Normally, I can also start many programs without errors (unless they consumes less than 22 MB total error opening a ksh shell sh.exe:"_main: memory allocation at startup :)). Unfortunately, Nokia Ovi Maps can sometime require much memory, so I can get the full memory error message.



    So my idea was to free some memory unloading SPB Mobile Shell, and load it again when I am finished.



    Now I am going to follow your suggestion, NetQin Mobile Guard, to manage startup programs.

    Thanks again for your effort.

    Regards
     
    beffa2, Sep 3, 2016
    #3
  4. error opening a ksh shell sh.exe:"_main: memory allocation at startup

    Tap F8 just before you would usually see the Windows flag appear on startup. Select "Safe Mode with Networking". Does it still fail to start?

    If it does not, right click your start button, select Command Prompt (Admin) and type "sfc /scannow" then reboot.

    If it doesn't start, or gives you the same error, reboot the computer again and select "Startup Repair" then follow the prompts.

    Post back with how it goes.

    Andrew
     
    StarEmpire, Sep 3, 2016
    #4
  5. klong915 Win User
    [Safe Mode with Networking]
    Window pops up reading: Get Started this app can't be opened with build-in admin account.
    Clicked <ok>
    The shell open behaves same.


    <cmd>[sfc /scannow - reboot]
    "Windows Resource Protection did not find any integrity violations."
    The shell open behaves same.


    [start-up repair]
    The shell open behaves same.


    This is a clean install of Win 10 Pro. and ksh open worked. the anniversary update caused the failure with shell.
    The ksh open may or may not occur in error; whether opened in error or not the shell window suffers at times with the prompt:"_main: memory allocation error during startup." when ever you enter commands. It's broken.
     
    klong915, Sep 4, 2016
    #5
  6. Mystere Win User
    Are you using the latest insider build? Or are you using the public 14393.xx build? There is a known issue in the latest insider (14915) that causes the bash shell to stop working, you need to uninstall and reinstall it from Programs & Features. Or are you using git-bash?
     
    Mystere, Sep 4, 2016
    #6
  7. klong915 Win User
    I'm using the public updater. The anniversary update is a major step, takes twice as long as the windows 12 pro install. The A update recreates windows dir; If the insider build is needed, should I just re-start the install from 0 (clean re-install of windows 10 pro and then update via insider build).
    Bash is also used on this pc but employs mintty; it is not affected by the A build. The ksh uses a window like that of cmd in dos utilities. ksh is the program that is now broken upon A build.
    The A build alters permissions/ownership of windows dir, ksh uses utils in windows/system32. In windows 7 ownership of windows dir was taken from trusty and given to this user.
    The goal is to molest windows 10 as little as possible and continue to use ksh on it.
     
    klong915, Sep 4, 2016
    #7
  8. error opening a ksh shell sh.exe:"_main: memory allocation at startup

    I would wait for an update. You could try a refresh, and open the permissions of your whole Windows folder to everyone to see if it makes a difference (the memory allocation error could be privilege related - sh.exe could need a resource that it no longer has permission to access or execute) but the most likely problem is a file update making problems in the expected memory addresses sh.exe references, and sh tries to put something in space that is now in use.

    Only the devs of ksh or sh can fix that.
     
    StarEmpire, Sep 5, 2016
    #8
  9. klong915 Win User
    Well, I wish I knew a way to make this happen; we can alter number of buffers and buffer size; neither of which were alter B/W 10 and the A update. Maybe I should take ownership of windows as in windows 7.
     
    klong915, Sep 6, 2016
    #9
  10. klong915 Win User
    OK, trying to take ownership of the windows dir appeared to be the wrong direction after a little effort to do so. Aborted this and recovered from a restore point (trouble was expected).
    So things are just as they were, broken: ksh will intermittently work and fail with error message "_main: memory allocation error during startup."
     
    klong915, Apr 4, 2018
    #10
Thema:

error opening a ksh shell sh.exe:"_main: memory allocation at startup

Loading...
  1. error opening a ksh shell sh.exe:"_main: memory allocation at startup - Similar Threads - error opening ksh

  2. Windows memory allocation

    in Windows 10 Gaming
    Windows memory allocation: I have dell inspiron 15 , Ryzen 5 7000 series laptop. I am using windows 11.after installed Ubuntu 22.04, the memory allocation got reduced to 2GB usable out 8GB for Windows 11 .Kindly assist. As the windows 11 is getting many crashing errors and got the system slower....
  3. Windows memory allocation

    in Windows 10 Software and Apps
    Windows memory allocation: I have dell inspiron 15 , Ryzen 5 7000 series laptop. I am using windows 11.after installed Ubuntu 22.04, the memory allocation got reduced to 2GB usable out 8GB for Windows 11 .Kindly assist. As the windows 11 is getting many crashing errors and got the system slower....
  4. SH File .sh properties

    in Windows 10 Network and Sharing
    SH File .sh properties: HiI have accidentally changed the properties of a ".sh" file and it opens with Adobe Acrobat Reader now. Can someone suggest me, what is to be done in order to restore the file to its original form.Thanks and regardsSabu G...
  5. SH File .sh properties

    in Windows 10 Gaming
    SH File .sh properties: HiI have accidentally changed the properties of a ".sh" file and it opens with Adobe Acrobat Reader now. Can someone suggest me, what is to be done in order to restore the file to its original form.Thanks and regardsSabu G...
  6. SH File .sh properties

    in Windows 10 Software and Apps
    SH File .sh properties: HiI have accidentally changed the properties of a ".sh" file and it opens with Adobe Acrobat Reader now. Can someone suggest me, what is to be done in order to restore the file to its original form.Thanks and regardsSabu G...
  7. Limit Memory Allocated to Cached

    in Windows 10 Drivers and Hardware
    Limit Memory Allocated to Cached: My Windows OS and all hardware work great with 1.3GB of cached memory, but over time Windows will ask for more, without any good purpose. I don't want to allow Windows to use more than it needs, I need the other memory for other applications, and if Windows Caches memory its...
  8. error: HAL MEMORY ALLOCATION

    in Windows 10 BSOD Crashes and Debugging
    error: HAL MEMORY ALLOCATION: During start up, my laptop gives an error HAL MEMORY ALLOCATION, 0x000000AC and a blue screen. I have Lenovo ThinkPad T61, Windows 10 pro 64 bit, 2004. https://answers.microsoft.com/en-us/windows/forum/all/error-hal-memory-allocation/ed054c97-5087-497e-8b15-ea7cc2c49e53
  9. How to run .sh or Shell Script file in Windows 10

    in Windows 10 News
    How to run .sh or Shell Script file in Windows 10: [ATTACH] [ATTACH]Shell Scripts or .SH files are like batch files of Windows which can be executed in Linux or Unix. It is possible to run .sh or Shell Script file in Windows 10 using Windows Subsystem for Linux. In this post, [...] This post How to run .sh or Shell Script...
  10. Slow memory allocation on Windows

    in Windows 10 BSOD Crashes and Debugging
    Slow memory allocation on Windows: Hi, I have implemented a program and found out that the performance of allocation a lot of memory is severely limited on Windows. Allocating and reusing a single chunk of memory (10 MB) is actually fast, but initializing a lot of new memory (30 GB) is very slow and...

Users found this page by searching for:

  1. memory allocation error _main

    ,
  2. korn shell s main memory allocation startup