Windows 10安装MIT Scheme遇‘Requested Allocation is too large’问题求助
Hey there! I’ve been down this exact road setting up Scheme for SICP, so let’s break this down clearly for you.
First off: don’t waste time with folder properties—that’s not where you add command-line arguments like --library or --edit. You’ll need to use either Git Bash or Command Prompt (CMD) to pass these parameters directly to the Scheme executable, or create a shortcut/script to automate it. Here’s how to do both:
Option 1: Run Directly in CMD or Git Bash
For CMD:
- Open Command Prompt, then navigate to your Scheme bin directory using
cd:cd C:\your\scheme\installation\bin - Run the executable with your desired parameters. If you’re using MIT Scheme (the most common choice for SICP):
Replace the library path with the actual location of your Scheme’s library files (usually amit-scheme.exe --library "C:\path\to\your\scheme\library" --editlibfolder in your Scheme installation directory).
For Git Bash:
- Open Git Bash, then navigate to the bin directory (note the forward slashes and
/c/for the C drive):cd /c/your/scheme/installation/bin - Run the executable with parameters:
./mit-scheme.exe --library "/c/path/to/your/scheme/library" --edit
Option 2: Create a Shortcut/Script for One-Click Launch
If you don’t want to type these commands every time:
Windows Batch File (for CMD/Git Bash):
Create a new text file in your Scheme bin directory, rename itscheme-launch.bat, and paste this inside (adjust paths as needed):@echo off C:\your\scheme\installation\bin\mit-scheme.exe --library "C:\your\scheme\installation\lib" --editDouble-click this batch file to launch Scheme with the correct parameters every time.
Git Bash Shell Script:
Create a new file namedscheme-launch.sh, paste this:#!/bin/bash /c/your/scheme/installation/bin/mit-scheme.exe --library "/c/your/scheme/installation/lib" --editMake it executable with
chmod +x scheme-launch.sh, then run it with./scheme-launch.sh.
Why This Fixes the "Requested Allocation is too large" Error
This issue usually pops up when Scheme can’t find its core library files, leading it to make incorrect memory allocation requests. By explicitly pointing it to the correct library directory with --library, you help the interpreter load the right resources, which resolves the memory error. The --edit parameter just launches the built-in editor, which is handy for writing SICP exercises directly in Scheme.
内容的提问来源于stack exchange,提问作者Dan

