Flying bird without wings d: \ linux \ linuxkernel \ WORKING_DIRECTORY \ android-omap-20111108-gingerbread \ dalvik \ vm \ alloc \ HeapSource. cGcHeap * dvmHeapSourceStartup (size_t startSize, size_t absoluteMaxSize) {/** Allocate a contiguous region of virtual memory to subdivided * among the heaps managed by the garbage collector. */length = ALIGN_UP_TO_PAGE_SIZE (absoluteMaxSize); // base = dvmAllocRegion (length, PROT_NONE, "dalvik- Heap "); // doesn't support PROT_NONE on windows base = dvmAllocRegion (length, PROT_READ | PROT_WRITE," dalvik-heap "); d: \ linux \ linuxkernel \ WORKING_DIRECTORY \ android-omap-20111108-gingerbread \ dalvik \ vm \ alloc \ Heap. cbool dvmHeapStartup () {gcHeap = dvmHeapSourceStartup (gDvm. heapSizeStart, gDvm. heapSizeMax); d: \ linux \ linuxkernel \ WORKING_DIRECTORY \ android-omap-20111108-gingerbread \ dalvik \ vm \ alloc \ Alloc. cboo L dvmGcStartup (void) {dvmInitMutex (& gDvm. gcHeapLock); return dvmHeapStartup ();} d: \ linux \ linuxkernel \ WORKING_DIRECTORY \ android-omap-20111108-gingerbread \ dalvik \ vm \ Init. cstatic int dvmProcessOptions (int argc, const char * const argv [], bool ignoreUnrecognized) {} else if (strncmp (argv [I], "-Xmx", 4) = 0) {int dvmStartup (int argc, const char * const argv [], bool ignoreUnrecognized, JNIEnv * pEnv) {setC OmmandLineDefaults (); cc = dvmProcessOptions (argc, argv, ignoreUnrecognized); if (! DvmGcStartup () int dvmPrepForDexOpt (const char * bootClassPath, DexOptimizerMode dexOptMode, DexClassVerifyMode verifyMode, int dexoptFlags) {setCommandLineDefaults (); if (! DvmGcStartup () d: \ linux \ linuxkernel \ WORKING_DIRECTORY \ ango \ angowx \ android \ AndroidRuntime. cppint AndroidRuntime: startVm (JavaVM ** pJavaVM, JNIEnv ** pEnv) {strcpy (heapsizeOptsBuf, "-Xmx"); property_get ("dalvik. vm. heapsize ", heapsizeOptsBuf + 4," 16 m "); opt. optionString = heapsizeOptsBuf; mOptions. add (opt); www.2cto.com if (JNI_CreateJavaVM (pJavaVM, pEnv, & initArgs) <0) {D: \ linux \ linuxker Nel \ WORKING_DIRECTORY \ android-omap-20111108-gingerbread \ dalvik \ vm \ Jni. c if (dvmStartup (argc, argv, args-> ignoreUnrecognized, (JNIEnv *) pEnv )! = 0) {d: \ linux \ linuxkernel \ WORKING_DIRECTORY \ android-omap-20111108-gingerbread \ dalvik \ vm \ Init. cstatic void setCommandLineDefaults () {/* Defaults overridden by-Xms and-Xmx. * TODO: base these on a system or application-specific default */gDvm. heapSizeStart = 2*1024*1024; // Spec says 16 MB; too big for us. // gDvm. heapSizeMax = 16*1024*1024; // Spec says 75% physical mem gDvm. heapSizeMax = 32*1024*1024; // Spec says 75% physical mem