10017 RESOURCE_UNAVAILABLE
时间: 2023-09-12 07:13:36 浏览: 194
10017 RESOURCE_UNAVAILABLE是一个错误代码,表示资源不可用。根据引用,当使用pthread_create函数创建线程时失败,返回值11,即Resource temporarily unavailable,这意味着系统在创建线程时没有足够的资源可用。根据引用,可能是由于栈空间分配过大,导致系统在预分配虚拟内存时耗尽了所有内存,无法为新创建的线程分配足够的内存。另外,根据引用中的建议,在编辑/etc/security/limits.conf文件时可以增加* soft stack 102400这样的配置,以增加栈的大小限制,从而避免出现资源不可用的问题。然而,根据引用,虽然有些例子中可能没有使用while循环,但在处理资源分配方面的知识积累是很重要的,以确保程序的正常运行。因此,通过增加栈的大小限制以及加强对资源分配的管理,可以减少资源不可用的问题的发生。<span class="em">1</span><span class="em">2</span><span class="em">3</span><span class="em">4</span>
相关问题
avcodec_receive_frame报错err:Resource temporarily unavailable
The "Resource temporarily unavailable" error message in avcodec_receive_frame typically indicates that the function is unable to retrieve a decoded frame from the codec at the current time.
There are several potential reasons why this error may be occurring, including:
1. Insufficient resources: If your system is low on memory or processing power, avcodec_receive_frame may be unable to retrieve the decoded frame due to resource limitations.
2. Incorrect usage: It's possible that you may be using the function incorrectly, such as calling it too frequently or with the wrong parameters.
3. Unexpected input: If the codec encounters unexpected input or data, it may be unable to decode the frame properly, leading to the "Resource temporarily unavailable" error message.
To resolve this error, you may want to try the following steps:
1. Check your system resources: Ensure that your system has sufficient memory and processing power to handle the decoding task.
2. Verify function usage: Double-check that you are calling avcodec_receive_frame with the correct parameters and frequency.
3. Verify input data: Check that the input data being decoded is in the expected format and does not contain any unexpected data.
If none of these steps resolve the issue, you may want to consult the documentation for avcodec_receive_frame or seek assistance from a forum or support community for the specific codec or application you are using.
FFmpeg avcodec_send_packet 报错err:Resource temporarily unavailable
The "Resource temporarily unavailable" error in FFmpeg's `avcodec_send_packet()` function typically indicates that the codec's internal buffers are full and cannot accept more data at the moment.
To resolve this issue, you can try one or more of the following steps:
1. Check if you are sending packets too quickly to the codec. If you are sending packets at a high rate, the codec may not be able to keep up and may return this error. You can try slowing down the rate at which you are sending packets to the codec.
2. Increase the size of the codec's internal buffers. This can be done by setting the appropriate parameters in the codec context before initializing the codec.
3. Check if the packet data is valid and correctly formatted. If the data is corrupted or not in the expected format, the codec may reject the packet and return this error.
4. Try flushing the codec's buffers by sending a NULL packet to the codec using `avcodec_send_packet()`. This can be useful if the codec's internal buffers are stuck in a state where they cannot accept any more data.
If none of these steps resolve the issue, there may be other underlying issues with your code or system configuration that are causing the error. In that case, you may need to seek further assistance or debugging support.
阅读全文