From: Rudolf Marek <r.marek at assembler.cz>
To: devel@acpica.org
Subject: [Devel] AcpiOsAllocate with zero argument
Date: Wed, 27 Jul 2016 18:53:53 +0200 [thread overview]
Message-ID: <5798E721.9010306@assembler.cz> (raw)
[-- Attachment #1: Type: text/plain, Size: 809 bytes --]
Hi all,
I could not find in the "ACPICA Overview and Programmer Reference" any clues
what to do if someone calls AcpiOsAllocate() with size of zero. I checked the
Linux implementation and it just calls kmalloc() which after bit of googling
seems to return non-NULL for this case. I also tried to walk through the ACPICA
sources and it seems to me that at least on some places it looks like that it
could be called with 0 (num_gpe * sizeof(something))
I also tried to look to the "osdeps" of what the UEFI or unix stub do, but they
simply pass it on. I could not find what UEFI does with zero, I only know
that malloc can either return NULL (and success) or return also non-null pointer.
What is the correct way to handle the zero size allocations? Return non-NULL ?
Thanks
Rudolf
next reply other threads:[~2016-07-27 16:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-27 16:53 Rudolf Marek [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-07-28 5:29 [Devel] AcpiOsAllocate with zero argument Zheng, Lv
2016-07-28 8:06 Rudolf Marek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5798E721.9010306@assembler.cz \
--to=devel@acpica.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.