What is the posix_memalign() equivalent for the PostgreSQL?

From: Anderson Carniel <accarniel(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: What is the posix_memalign() equivalent for the PostgreSQL?
Date: 2016-09-01 17:12:39
Message-ID: CAAAXyN0v400KUhp=eyXybJmZJ+cg_==4f-qzwbXvzkJTWxyhhQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dear all,

I am developing an extension for the PostgreSQL that write/read some
external files from the PostgreSQL. In order to write/read, I am using the
O_DIRECT flag and using the posix_memalign to allocate memory. I would like
to know if the postgresql internal library provides an equivalent function
for the posix_memalign since I am getting unexpected errors. All my
allocations are in the TopMemoryContext since I am working with several
buffers that must be alive while the PostgreSQL Server is activated.

Thanks in advance,
Anderson

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-09-01 17:16:37 Re: System load consideration before spawning parallel workers
Previous Message Peter Eisentraut 2016-09-01 17:12:22 Re: Remove superuser() checks from pgstattuple