Programmingkid <programmingk...@gmail.com> writes:

> On Aug 25, 2015, at 11:33 AM, Peter Maydell wrote:
>
>> On 25 August 2015 at 16:25, Programmingkid <programmingk...@gmail.com> wrote:
>>> On Aug 25, 2015, at 8:42 AM, Markus Armbruster wrote:
>>>> Eric Blake <ebl...@redhat.com> writes:
>>>> 
>>>>> On 08/24/2015 12:53 PM, Programmingkid wrote:
>>>>>> +/* USB's max number of devices is 127. This number is 3 digits long. */
>>>>>> +#define MAX_NUM_DIGITS_FOR_USB_ID 3
>>>> 
>>>> This limit makes no sense to me.
>>> 
>>> The limit is used to decide how many characters the device_id
>>> string is going to have.
>>> Three digits would be 0 to 999 device ID's would be supported. I
>>> can't imagine
>>> anyone spending the time to add that many devices.
>> 
>> Arbitrary limits are often a bad idea, especially when
>> they're easy to avoid, as here.
>
> Knowing QEMU's limits can save the user from crashes and other
> problems. There is
> only a finite amount of memory available to QEMU. 

Repeat N times:
    device_add FOO,id=hot
    device_del hot

Memory usage independent of N (unless we leak, but that would be a bug).

[...]

Reply via email to