ttWarnOnLowMemory

ttWarnOnLowMemory 指示在永久分区或临时分区中的内存使用量与已分配内存的比率超过连接的已配置阈值的情况下,是否向应用程序返回警告。

语法:ttWarnOnLowMemory(PermPartitionFlag, TempPartitionFlag)

PermPartitionFlag 和 TempPartitionFlag 可以设置为 0(禁用)或 1(启用),用于指示在永久分区或临时分区中的内存使用量与已分配内存的比率分别超过连接的已配置阈值的情况下,是否向应用程序返回警告。

PermWarnThreshold 和 TempWarnThreshold DSN 属性用于设置每个数据存储分区的阈值。最初,禁止为两个分区生成低内存警告。要求返回内存不足的警告的每个连接必须调用 ttWarnOnLowMemory 内置过程。

将 PermPartitionFlag 设置为 1 时,如果永久分区占用的空间大小与其已分配空间大小之比大于在 PermWarnThreshold 属性中设置的百分比,则返回 TimesTen 警告 6222(Permanent data partition in use size has exceed PermWarnThreshold(永久数据分区占用的空间大小超过了PermWarnThreshold))。

将 TempPartitionFlag 设置为 1 时,如果临时分区占用的空间大小与其已分配空间大小之比大于在 TempWarnThreshold 属性中设置的百分比,则返回 TimesTen 警告 6223(Temporary data partition in use size has exceed TempWarnThreshold(临时数据分区占用的空间大小超过了 TempWarnThreshold))。

示例:

call ttWarnOnLowMemory(1, 1)

留言