VirtualBox

Changeset 17420 in vbox for trunk


Ignore:
Timestamp:
Mar 5, 2009 7:41:58 PM (16 years ago)
Author:
vboxsync
Message:

REM: fix problem in REM codegen buffer size initialization, leading to very small (1M) code buffer. Now use 8M always.

Location:
trunk/src/recompiler_new
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/recompiler_new/cpu-all.h

    r17342 r17420  
    11861186extern RTGCPHYS phys_ram_size;
    11871187/** This is required for bounds checking the phys_ram_dirty accesses. */
    1188 extern uint32_t phys_ram_dirty_size;
     1188extern RTGCPHYS phys_ram_dirty_size;
    11891189#endif /* VBOX */
    11901190#if !defined(VBOX)
  • trunk/src/recompiler_new/exec.c

    r17342 r17420  
    138138/* we have memory ranges (the high PC-BIOS mapping) which
    139139   causes some pages to fall outside the dirty map here. */
    140 uint32_t phys_ram_dirty_size;
     140RTGCPHYS phys_ram_dirty_size;
    141141#endif /* VBOX */
    142142#if !defined(VBOX)
     
    468468
    469469#ifdef VBOX
    470 /** @todo nike: isn't 32M too much ? */
    471 #endif
     470/*
     471 * We don't need such huge codegen buffer size, as execute most of the code
     472 * in raw or hwacc mode
     473 */
     474#define DEFAULT_CODE_GEN_BUFFER_SIZE (8 * 1024 * 1024)
     475#else
    472476#define DEFAULT_CODE_GEN_BUFFER_SIZE (32 * 1024 * 1024)
     477#endif
    473478
    474479#if defined(CONFIG_USER_ONLY)
     
    491496    code_gen_buffer_size = DEFAULT_CODE_GEN_BUFFER_SIZE;
    492497    map_exec(code_gen_buffer, code_gen_buffer_size);
     498#else
     499#ifdef VBOX
     500    /* We cannot use phys_ram_size here, as it's 0 now,
     501     * it only gets initialized once RAM registration callback
     502     * (REMR3NotifyPhysRamRegister()) called.
     503     */
     504    code_gen_buffer_size = DEFAULT_CODE_GEN_BUFFER_SIZE;
    493505#else
    494506    code_gen_buffer_size = tb_size;
     
    501513        code_gen_buffer_size = (unsigned long)(phys_ram_size / 4);
    502514#endif
     515
    503516    }
    504517    if (code_gen_buffer_size < MIN_CODE_GEN_BUFFER_SIZE)
    505518        code_gen_buffer_size = MIN_CODE_GEN_BUFFER_SIZE;
     519#endif /* VBOX */
     520
    506521    /* The code gen buffer location may have constraints depending on
    507522       the host cpu and OS */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette