macOS/iOS API解説

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。2010年代に書かれた内容です。今後更新はありません。

目次

NSGetWindowServerMemory

コンテキストによって使われているメモリの合計を返します
int  NSGetWindowServerMemory ( 
      int   context , 
      int *   virtualMemory , 
      int *   windowBackingMemory , 
      NSString **   windowDumpStream );

解説

コンテキストによって使われているメモリの合計を返します。

返り値

引数

( int )context
( int * )virtualMemory
( int * )windowBackingMemory
( NSString ** )windowDumpStream

フレームワーク

ApplicationKit

クラス

NSGetWindowServerMemory

Function

使用可能

10.0

参照

例文

#import "Controller.h"

@implementation Controller

- (IBAction)pushButton:(id)sender
{
NSPoint point;
int virtualMemory ;
int windowBackingMemory;
NSString *windowDumpStream;

[[NSApp context] setPatternPhase:NSMakePoint(1.0,1.0)];

NSGetWindowServerMemory(0,&virtualMemory,&windowBackingMemory,&windowDumpStream);

NSLog([NSString stringWithFormat:@"%d,%d,%@",virtualMemory,windowBackingMemory,windowDumpStream]);

}


@end