|
From: Roger H. <rog...@mi...> - 2005-08-25 19:12:38
|
Sounds good. Can we get anything out of OpenGL? VRAM usage would be
useful.
If we are going to have max bytes, why not max allocations too?
I currently only use CodeWarrior and XCode, so I can't add anything
about long long,
except to say that the size of short, int, long , long long are not
defined by the
language. You could find a compiler where they are all the same. If I
were to write
a C compiler for the old mainframe I have at home, all of them would be
48 bits,
(actually 12 decimal digits otherwise indexing wouldn't work). Mind you
there
would be no need for Quesa - it doesn't have a screen, nor even a
terminal.
Roger.
On 25 Aug, 2005, at 19:04, James W. Walker wrote:
> One might be curious about Quesa memory usage for performance tuning
> and detecting leaks. (Some kinds of leaks might not be detected by
> the current leak detector.) So I propose an API like the following:
>
> #define kQ3MemoryStatisticsStructureVersion 1
>
> /*!
> @struct TQ3MemoryStatistics
> @abstract Parameter structure for Q3Memory_GetStatistics.
> @field structureVersion Version of this structure.
> Initialize to kQ3MemoryStatisticsStructureVersion.
> @field currentAllocations Current number of memory blocks allocated
> by Quesa.
> @field currentBytes Current number of memory bytes allocated by
> Quesa.
> @field maxBytes Maximum number of memory bytes allocated by Quesa
> ("high-water mark").
> */
> typedef struct TQ3MemoryStatistics
> {
> TQ3Uns32 structureVersion;
> TQ3Uns32 currentAllocations;
> TQ3Uns64 currentBytes;
> TQ3Uns64 maxBytes;
> } TQ3MemoryStatistics;
>
>
> /*!
> @function Q3Memory_GetStatistics
> @abstract Get information about Quesa memory usage.
> @discussion This function will only succeed if Quesa was compiled with
> Q3_DEBUG defined to be nonzero.
> @param info Structure to receive memory statistics. You must
> initialize
> the structureVersion field.
> @result Success or failure of the operation.
> */
> Q3_EXTERN_API_C( TQ3Status )
> Q3Memory_GetStatistics (
> TQ3MemoryStatistics* info
> );
>
>
> By the way, how widespread is compiler support for long long (64 bit)
> integer types? I don't see long long in the C++ standard, though it
> is in C99.
> --
> James W. Walker, ScriptPerfection Enterprises, Inc.
> <http://www.write-brain.com/>
>
>
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle
> Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing
> & QA
> Security * Process Improvement & Measurement *
> http://www.sqe.com/bsce5sf
> _______________________________________________
> Quesa-develop mailing list
> Que...@li...
> https://lists.sourceforge.net/lists/listinfo/quesa-develop
>
|