AbsoluteMaxSize dalvik. vm. heapsize

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.