Peter Maydell writes:
> On 13 June 2013 08:02, Markus Armbruster wrote:
>> #ifdef __linux__
>>
>> +static void no_guest_mem(RAMBlock *block)
>> +{
>> +fprintf(stderr, "Cannot set up guest memory '%s': %s\n",
>> +block->mr->name, strerror(errno));
>> +exit(1);
>> +}
>
> This
Richard Henderson writes:
> On 06/13/2013 12:02 AM, Markus Armbruster wrote:
>> @@ -945,7 +952,7 @@ static void *file_ram_alloc(RAMBlock *block,
>> area = mmap(0, memory, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
>> #endif
>> if (area == MAP_FAILED) {
>> -perror("file_ram_al
On 13 June 2013 08:02, Markus Armbruster wrote:
> #ifdef __linux__
>
> +static void no_guest_mem(RAMBlock *block)
> +{
> +fprintf(stderr, "Cannot set up guest memory '%s': %s\n",
> +block->mr->name, strerror(errno));
> +exit(1);
> +}
This new error message is inside an #ifdef
On 06/13/2013 12:02 AM, Markus Armbruster wrote:
> @@ -945,7 +952,7 @@ static void *file_ram_alloc(RAMBlock *block,
> area = mmap(0, memory, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
> #endif
> if (area == MAP_FAILED) {
> -perror("file_ram_alloc: can't mmap RAM pages");
> +
Am 13.06.2013 09:02, schrieb Markus Armbruster:
> We abort() on memory allocation failure. abort() is appropriate for
> programming errors. Maybe most memory allocation failures are
> programming errors, maybe not. But guest memory allocation failure
> isn't, and aborting when the user asks for
We abort() on memory allocation failure. abort() is appropriate for
programming errors. Maybe most memory allocation failures are
programming errors, maybe not. But guest memory allocation failure
isn't, and aborting when the user asks for more memory than we can
provide is not nice. exit(1) in