<commit_before>/**
 * JorConsole - Jor1k running in a standard console
 */

var fs = require('fs');
var jorconsole = require('./lib/jorconsole');
var JorConsole = jorconsole.jorConsole;

var useSimpleFs = false;

//var httpBase = "https://s-macke.github.io/jor1k/";
var httpBase = "file://";
var realBase = fileBase = __dirname + "/" + "jor1k-sysroot/or1k/";
var fileSrc  = "basefs.json";
if(!useSimpleFs) {
	fileBase = __dirname + "/" + "jor1k-sysroot/fs/";
	fileSrc  = "fs.json";
}

var vmlinux = "vmlinux.bin";
if(!fs.existsSync(fileBase + vmlinux)) {
	console.log("Consider unpacking vmlinux using: bunzip2 -k vmlinux.bin.bz2 in the " + realBase + " directory");
	vmlinux += ".bz2";
	if(!fs.existsSync(fileBase + vmlinux)) {
		console.log("Couldn't find " + fileBase + vmlinux + ", were the submodules initialized? Kernel probably won't boot");
	}
}

var ncores = 1;
var threading = 'webthreads';
// also available: webworker
//threading = 'webworker';
var cpu = 'safe';
cpu = 'asm';

// Not recommended: kernel fails to find root
if(false) {
	cpu = 'smp';
	ncores = 2;
	vmlinux = "vmlinuxsmp.bin.bz2";
}

var relayURL = 'https://relay.widgetry.org/';
//relayURL = false; // disable networking

var jc = new JorConsole({
	path: httpBase + fileBase,
	fs: {
		basefsURL: fileSrc,
	},
	relayURL: relayURL,
	system: {
		cpu: cpu,
		kernelURL: vmlinux,
		ncores: ncores,
	},
	threading: threading,
});<commit_msg>Increase memory size to 64mb<commit_after>/**
 * JorConsole - Jor1k running in a standard console
 */

var fs = require('fs');
var jorconsole = require('./lib/jorconsole');
var JorConsole = jorconsole.jorConsole;

var memorysize = 64; // memory available in mb

var useSimpleFs = false;

//var httpBase = "https://s-macke.github.io/jor1k/";
var httpBase = "file://";
var realBase = fileBase = __dirname + "/" + "jor1k-sysroot/or1k/";
var fileSrc  = "basefs.json";
if(!useSimpleFs) {
	fileBase = __dirname + "/" + "jor1k-sysroot/fs/";
	fileSrc  = "fs.json";
}

var vmlinux = "vmlinux.bin";
if(!fs.existsSync(fileBase + vmlinux)) {
	console.log("Consider unpacking vmlinux using: bunzip2 -k vmlinux.bin.bz2 in the " + realBase + " directory");
	vmlinux += ".bz2";
	if(!fs.existsSync(fileBase + vmlinux)) {
		console.log("Couldn't find " + fileBase + vmlinux + ", were the submodules initialized? Kernel probably won't boot");
	}
}

var ncores = 1;
var threading = 'webthreads';
// also available: webworker
//threading = 'webworker';
var cpu = 'safe';
cpu = 'asm';

// Not recommended: kernel fails to find root
if(false) {
	cpu = 'smp';
	ncores = 2;
	vmlinux = "vmlinuxsmp.bin.bz2";
}

var relayURL = 'https://relay.widgetry.org/';
//relayURL = false; // disable networking

var jc = new JorConsole({
	path: httpBase + fileBase,
	fs: {
		basefsURL: fileSrc,
	},
	relayURL: relayURL,
	system: {
		cpu: cpu,
		kernelURL: vmlinux,
		memorysize: memorysize,
		ncores: ncores,
	},
	threading: threading,
});
{'fraction_non_alphanumeric': 0.16409200137315483, 'fraction_numerical': 0.008925506350841057, 'mean_word_length': 3.9811965811965813, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4238312', 'n_tokens_mistral': 1162, 'n_tokens_neox': 1091, 'n_words': 273}