On Thu, Apr 12, 2012 at 2:49 AM, Orit Wasserman <owass...@redhat.com> wrote:

> Add LRU page cache mechanism.
> The page are accessed by their address.
>
> Signed-off-by: Orit Wasserman <owass...@redhat.com>
> Signed-off-by: Benoit Hudzia <benoit.hud...@sap.com>
> Signed-off-by: Petter Svard <pett...@cs.umu.se>
> Signed-off-by: Aidan Shribman <aidan.shrib...@sap.com>
> ---
>  arch_init.c |  220
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 files changed, 220 insertions(+), 0 deletions(-)
>
> diff --git a/arch_init.c b/arch_init.c
> index 595badf..2e534f1 100644
> --- a/arch_init.c
> +++ b/arch_init.c
> @@ -28,6 +28,7 @@
>  #include <sys/types.h>
>  #include <sys/mman.h>
>  #endif
> +#include <assert.h>
>  #include "config.h"
>  #include "monitor.h"
>  #include "sysemu.h"
> @@ -44,6 +45,14 @@
>  #include "exec-memory.h"
>  #include "hw/pcspk.h"
>
> +#ifdef DEBUG_ARCH_INIT
> +#define DPRINTF(fmt, ...) \
> +    do { fprintf(stdout, "arch_init: " fmt, ## __VA_ARGS__); } while (0)
> +#else
> +#define DPRINTF(fmt, ...) \
> +    do { } while (0)
> +#endif
> +
>  #ifdef TARGET_SPARC
>  int graphic_width = 1024;
>  int graphic_height = 768;
> @@ -127,6 +136,217 @@ static int is_dup_page(uint8_t *page)
>     return 1;
>  }
>
> +/***********************************************************/
> +/* Page cache for storing previous pages as basis for XBZRLE compression
> */
> +#define CACHE_N_WAY 2 /* 2-way assossiative cache */
>

typo, %s/assossiative/associative/

...

Reply via email to